-/*
+/* $Id$
+
This file is part of libmspcore
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
try
{
- app_=reg_app_->create_app(argc, argv);
+ try
+ {
+ app_=reg_app_->create_app(argc, argv);
+ }
+ catch(const UsageError &e)
+ {
+ reg_app_->usage(e.what(), argv[0], e.get_brief());
+ return 1;
+ }
+
+ int result=app_->main();
+ delete app_;
+ return result;
}
- catch(const UsageError &e)
+ catch(const exception &e)
{
- reg_app_->usage(e.what(), argv[0], e.get_brief());
- return 1;
+ cerr<<"An uncaught exception occurred.\n";
+ cerr<<" type: "<<typeid(e).name()<<'\n';
+ cerr<<" what(): "<<e.what()<<'\n';
+ delete app_;
+ throw;
}
-
- int result=app_->main();
- delete app_;
- return result;
}
/**