a764624515f1c157a342dfcb972a41d63287b0ba
[scilab.git] / scilab / modules / core / src / c / ExceptionMessage.c
1 /*-----------------------------------------------------------------------------------*/
2 /* INRIA 2006 */
3 /* Allan CORNET */
4 /*-----------------------------------------------------------------------------------*/
5 #include "MALLOC.h"
6 #include "GetExceptionCode.h"
7 #include "ExceptionMessage.h"
8 #include "message_scilab.h"
9 /*-----------------------------------------------------------------------------------*/
10 extern char *GetExceptionString(DWORD ExceptionCode);
11 /*-----------------------------------------------------------------------------------*/
12 void ExceptionMessage(DWORD ExceptionCode,char *functionname)
13 {
14         char *ExceptionString=GetExceptionString(ExceptionCode);
15         if (functionname)
16         {
17                 message_scilab(_("Warning !!! exception 2"),ExceptionString,functionname);
18         }
19         else
20         {
21                 message_scilab(_("Warning !!! exception 1"),ExceptionString);
22         }
23         if (ExceptionString) {FREE(ExceptionString);ExceptionString=NULL;}
24 }
25 /*-----------------------------------------------------------------------------------*/