fork(2) download
  1. #include <stdexcept>
  2.  
  3. class my_exception : public virtual std::exception {
  4. };
  5. class my_bad_widget_state : public virtual my_exception, public virtual std::logic_error {
  6. };
  7.  
  8. int main()
  9. {
  10. throw my_exception();
  11. }
Runtime error #stdin #stdout #stderr 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'my_exception'
  what():  std::exception