Add another error qualifier to decribe the current policy

when a doubling token exists (or is created) in the netlist.
This commit is contained in:
Holger Vogt 2023-04-25 14:37:00 +02:00
parent 28a3413dd2
commit 81012de4d0
3 changed files with 7 additions and 3 deletions

View File

@ -34,7 +34,8 @@ Author: 1986 Thomas L. Quarles
#define E_NOCHANGE 13 /* simulator can't tolerate any more topology changes */ #define E_NOCHANGE 13 /* simulator can't tolerate any more topology changes */
#define E_NOTFOUND 14 /* simulator can't find something it was looking for */ #define E_NOTFOUND 14 /* simulator can't find something it was looking for */
#define E_BAD_DOMAIN 15 /* output interface begin/end domain calls mismatched */ #define E_BAD_DOMAIN 15 /* output interface begin/end domain calls mismatched */
#define E_EXISTS_BAD 16 /* error - attempt to create duplicate */
/* instance or model. Bail out. */
#define E_PRIVATE 100 /* messages above this number are private to */ #define E_PRIVATE 100 /* messages above this number are private to */
/* the simulator and MUST be accompanied by */ /* the simulator and MUST be accompanied by */

View File

@ -32,7 +32,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *modPtr, GENinstance **inInstPtr, IFuid name
if (instPtr) { if (instPtr) {
if (inInstPtr) if (inInstPtr)
*inInstPtr = instPtr; *inInstPtr = instPtr;
return E_EXISTS; return E_EXISTS_BAD;
} }
type = modPtr->GENmodType; type = modPtr->GENmodType;

View File

@ -29,6 +29,9 @@ const char *SPerror(int type)
case E_EXISTS: case E_EXISTS:
msg = "device already exists, existing one being used"; msg = "device already exists, existing one being used";
break; break;
case E_EXISTS_BAD:
msg = "device already exists, bail out";
break;
case E_NODEV: case E_NODEV:
msg = "no such device"; msg = "no such device";
break; break;