--- parser3/src/main/pa_exception.C 2001/01/30 11:51:07 1.1 +++ parser3/src/main/pa_exception.C 2001/01/30 13:07:31 1.2 @@ -1,5 +1,5 @@ /* - $Id: pa_exception.C,v 1.1 2001/01/30 11:51:07 paf Exp $ + $Id: pa_exception.C,v 1.2 2001/01/30 13:07:31 paf Exp $ */ #include @@ -8,11 +8,11 @@ #include "pa_exception.h" #include "pa_common.h" -Exception::Exception() : +Exception::Exception()/* : ftype(0), fcode(0), fproblem_source(0), - fcomment("") { + fcomment("")*/ { } void Exception::die(char *acomment) { @@ -27,11 +27,14 @@ void Exception::raise(const String *atyp ftype=atype; fcode=acode; fproblem_source=aproblem_source; - - va_list args; - va_start(args, comment_fmt); - vsnprintf(fcomment, MAX_STRING, comment_fmt, args); - va_end(args); + + if(comment_fmt) { + va_list args; + va_start(args, comment_fmt); + vsnprintf(fcomment, MAX_STRING, comment_fmt, args); + va_end(args); + } else + fcomment[0]=0; longjmp(mark, 1); }