- Completed policy-related error handling code

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@839 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-08-10 22:59:00 +00:00
parent 48fc2f5a00
commit 17ca8156d9
7 changed files with 30 additions and 14 deletions

View file

@ -359,13 +359,21 @@ TextSimulation::on_run(const Tokens& arguments)
{
Simulation::get_instance().run();
}
catch (UserInterruptException e)
catch (const UserInterruptException& e)
{
p_stderr(_("ERROR: "));
p_stderr(e.what());
p_stderr(_("\nSimulation is now stopped\n"));
}
catch (NullPolicyException e)
catch (const MalformedPolicyException& e)
{
p_stderr(_("ERROR: "));
p_stderr(e.what());
p_stderr(_("\nSimulation is now stopped, and "
"the current policy will be deactivated\n"));
Simulation::get_instance().set_policy(NULL);
}
catch (const NullPolicyException& e)
{
p_stderr(_("ERROR: "));
p_stderr(e.what());