*** empty log message ***
[dyninst.git] / visi / src / error.C
1 /* $Log: error.C,v $
2 /* Revision 1.2  1994/03/14 20:28:47  newhall
3 /* changed visi subdirectory structure
4 /*  */ 
5 #include "visi/h/error.h"
6
7 static char *visi_errmsg[] =
8 {
9         "No Error",
10         "Error: realloc",
11         "Error: create datagrid",
12         "Error: subscript out of range",
13         "Error: aggregate datagrid error",
14         "Error: no valid element",
15         "Error: malloc",
16         "Error: strncpy"
17         "Error: VisiInit incorrect number of arguments"
18
19 };
20
21
22 void visi_ErrorHandler(int errno,char *msg){
23
24   if((errno < (VISI_ERROR_BASE))&&(errno >= VISI_ERROR_MAX))
25     fprintf(stderr,"%s : %s\n",visi_errmsg[VISI_ERROR_BASE-errno],msg);
26
27   else
28     fprintf(stderr,"ERROR: invalid errno = %d\n",errno);
29
30 }
31