|
|
|
|
|
This is the base class for all the exception objects. |
|
|
void throw_something( void )
{
try {
if(!1) {
throw( c_exception("Error, 1 is not true?", __FILE__, __LINE__ ) );
}
}
catch( c_exception e ) {
cout << "caught exception: " << endl;
cout << " msg was: " << e->m_msg << endl;
cout << " in file: " << e->m_file << endl;
cout << " at line: " << e->m_line << endl;
}
}
|