00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef SYNAPS_UTIL_ERROR_H
00011 #define SYNAPS_UTIL_ERROR_H
00012
00013
00014 #include <stdio.h>
00015 #include <stdarg.h>
00016 #include <fstream>
00017 #include <synaps/init.h>
00018
00019 __BEGIN_NAMESPACE_SYNAPS
00020
00021
00022 const char * ERR_SPACE = "\n NOT ENOUGH MEMORY ";
00023 const char * ERR_RANGE = "\n INDEX OUT OF RANGE ";
00024 const char * ERR_INIT = "\n INITIALIZATIONS NOT PERFECT ";
00025 const char * ERR_OPEN_FILE = "\n IMPOSSIBLE TO OPEN FILE ";
00026 const char * ERR_DIM = "\n Dimension check failure ";
00027 const char * ERR_POSITIVE = "\n Exposant not positive ";
00028 const char * ERR_FUNCTION = "Function: ";
00029 const char * ERR_CONSTRUCTOR = "Constructor: ";
00030 const char * ERR_OPERATOR = "Operator: ";
00031 const char * ERR_METH = "Method: ";
00032 const char * MFORMAT = "%G" ;
00033
00034
00035
00036 void Error(char *myformat,...)
00037 {
00038 va_list argPointer;
00039 va_start(argPointer,myformat);
00040 vfprintf(stderr,myformat,argPointer);
00041 va_end(argPointer);
00042 exit(1);
00043 }
00044
00045 __END_NAMESPACE_SYNAPS
00046
00047 #endif // SYNAPS_UTIL_ERROR_H