Esempio n. 1
0
VStringRetVal VException::ToString() const
{
	std::stringstream report;
	report << "[" << GetErrorFile() << "|" << GetErrorLine() << "] "
		<< GetErrorString();

	std::string reportmsg = report.str();

	return VString(reportmsg.c_str());
}
Esempio n. 2
0
BOOL InitError( void ) {
/***********************/

    if( errFile == NULL ) {
        if( Options & OPT_ERROR_FILE_SET ) {
            errFile = WigOpenFile( GetErrorFile(), "wt" );
        } else {
            errFile = stdout;
        }
    }
    return( errFile == NULL );
}
Esempio n. 3
0
void FiniError( void ) {
/***********************/

    char                *fname;
    unsigned long       size;

    if( Options & OPT_ERROR_FILE_SET ) {
        size = 0;
        if( errFile != NULL ) {
            size = ftell( errFile );
            WigCloseFile( errFile );
        }
        if( size == 0 ) {
            fname = GetErrorFile();
            if( !access( fname, F_OK ) ) {
                remove( fname );
            }
        }
    }
    errFile = stdout;
}