Internals: Route abort() through vlabort(). No functional change

This commit is contained in:
Wilson Snyder 2009-10-04 17:01:28 -04:00
parent 03c5d06107
commit 4f2dc0ecff
2 changed files with 14 additions and 11 deletions

View File

@ -303,6 +303,18 @@ string V3Error::msgPrefix(V3ErrorCode code) {
else return "%Warning-"+(string)code.ascii()+": ";
}
//======================================================================
// Abort/exit
void V3Error::vlAbort () {
if (V3Error::debugDefault()) {
cerr<<msgPrefix()<<"Aborting since under --debug"<<endl;
abort();
} else {
exit(10);
}
}
//======================================================================
// Global Functions
@ -325,10 +337,6 @@ void V3Error::suppressThisWarning() {
}
}
void V3Error::v3abort () {
v3fatalSrc("v3abort called\n");
}
void V3Error::v3errorEnd (ostringstream& sstr) {
#ifdef __COVERITY__
if (s_errorCode==V3ErrorCode::FATAL) __coverity_panic__(x);
@ -385,12 +393,7 @@ void V3Error::v3errorEnd (ostringstream& sstr) {
#endif
}
if (V3Error::debugDefault()) {
cerr<<msgPrefix()<<"Aborting since under --debug"<<endl;
abort();
} else {
exit(10);
}
vlAbort();
}
}
}

View File

@ -172,7 +172,7 @@ class V3Error {
static ostringstream& v3errorPrep (V3ErrorCode code) {
s_errorStr.str(""); s_errorCode=code; return s_errorStr; }
static ostringstream& v3errorStr () { return s_errorStr; }
static void v3abort();
static void vlAbort();
static void v3errorEnd(ostringstream& sstr); // static, but often overridden in classes.
};