1 /********** 2 Copyright 1990 Regents of the University of California. All rights reserved. 3 Author: 1986 Thomas L. Quarles 4 **********/ 5 6 /* 7 */ 8 9 #ifndef ngspice_IFERRMSG_H 10 #define ngspice_IFERRMSG_H 11 12 13 /* common error message descriptions */ 14 15 #define E_PAUSE -1 /* pausing on demand */ 16 17 #define OK 0 18 19 #define E_PANIC 1 /* vague internal error for "can't get here" cases */ 20 #define E_EXISTS 2 /* warning/error - attempt to create duplicate */ 21 /* instance or model. Old one reused instead */ 22 #define E_NODEV 3 /* attempt to modify a non-existant instance */ 23 #define E_NOMOD 4 /* attempt to modify a non-existant model */ 24 #define E_NOANAL 5 /* attempt to modify a non-existant analysis */ 25 #define E_NOTERM 6 /* attempt to bind to a non-existant terminal */ 26 #define E_BADPARM 7 /* attempt to specify a non-existant parameter */ 27 #define E_NOMEM 8 /* insufficient memory available - VERY FATAL */ 28 #define E_NODECON 9 /* warning/error - node already connected, old */ 29 /* connection replaced */ 30 #define E_UNSUPP 10 /* the specified operation is unsupported by the */ 31 /* simulator */ 32 #define E_PARMVAL 11 /* the parameter value specified is illegal */ 33 #define E_NOTEMPTY 12 /* deleted still referenced item. */ 34 #define E_NOCHANGE 13 /* simulator can't tolerate any more topology changes */ 35 #define E_NOTFOUND 14 /* simulator can't find something it was looking for */ 36 #define E_BAD_DOMAIN 15 /* output interface begin/end domain calls mismatched */ 37 38 39 #define E_PRIVATE 100 /* messages above this number are private to */ 40 /* the simulator and MUST be accompanied by */ 41 /* a proper setting of errMsg */ 42 /* this constant should be added to all such messages */ 43 /* to ensure error free operation if it must be */ 44 /* changed in the future */ 45 46 extern char *errMsg; /* descriptive message about what went wrong */ 47 /* MUST be tmalloc()'d - front end will tfree() */ 48 /* this should be a detailed message,and is assumed */ 49 /* tmalloc()'d so that you will feel free to add */ 50 /* lots of descriptive information with sprintf*/ 51 52 extern char *errRtn; /* name of the routine declaring error */ 53 /* should not be tmalloc()'d, will not be free()'d */ 54 /* This should be a simple constant in your routine */ 55 /* and thus can be set correctly even if we run out */ 56 /* of memory */ 57 58 #endif 59