- 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:
parent
48fc2f5a00
commit
17ca8156d9
7 changed files with 30 additions and 14 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue