c_exception

Table Of Contents

Introduction, c_exception

This is the base class for all the exception objects.

Example Code:
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;
  }
}

Up