// underflow_error.cpp // compile with: /EHsc /GR #include #include #include using namespace std; int main( ) { try { throw underflow_error( "The number's a bit small, captain!" ); } catch ( exception &e ) { cerr << "Caught: " << e.what( ) << endl; cerr << "Type: " << typeid( e ).name( ) << endl; }; }