Subject: C++ exceptions
To: None <current-users@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: current-users
Date: 09/27/1999 09:18:18
Are exceptions working for you? (or is there something wrong with the
following?)

#include <stdexcept>

int main()
{
  try { throw runtime_error("Wibble!"); }
  catch(const runtime_error& e)
    {
      cerr<<"Caught: "<<e.what()<<'\n';
      exit(1);
    }

  cout<<"Hello\n";
  return 0;
}
% c++ trial.cc -o trial -Wall
% trial
Abort trap (core dumped)

Cheers,

Patrick