00001
00002
00003
00004
00005 #include "MALLOC.h"
00006 #include "GetExceptionCode.h"
00007 #include "ExceptionMessage.h"
00008 #include "sciprint.h"
00009
00010 extern char *GetExceptionString(DWORD ExceptionCode);
00011
00012 void ExceptionMessage(DWORD ExceptionCode,char *functionname)
00013 {
00014 char *ExceptionString=GetExceptionString(ExceptionCode);
00015 if (functionname)
00016 {
00017 sciprint("Warning !!!\nScilab has found a critical error (%s)\nwith \"%s\" function.\nSave your data and restart Scilab.\n",ExceptionString,functionname);
00018 }
00019 else
00020 {
00021 sciprint("Warning !!!\nScilab has found a critical error (%s).\nSave your data and restart Scilab.\n",ExceptionString);
00022 }
00023 if (ExceptionString) {FREE(ExceptionString);ExceptionString=NULL;}
00024 }
00025