- 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
|
@ -73,7 +73,7 @@ ConcreteSimulation::stop()
|
|||
}
|
||||
|
||||
void
|
||||
ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException)
|
||||
ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
|
||||
{
|
||||
switch (_state)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException)
|
|||
//sleep
|
||||
Glib::usleep(_timer_interval*1000);
|
||||
}
|
||||
catch (UserInterruptException e)
|
||||
catch (const CPUPolicyException& e)
|
||||
{
|
||||
stop();
|
||||
throw;
|
||||
|
@ -134,7 +134,7 @@ ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException)
|
|||
else
|
||||
stop();
|
||||
}
|
||||
catch (UserInterruptException e)
|
||||
catch (const CPUPolicyException& e)
|
||||
{
|
||||
stop();
|
||||
throw;
|
||||
|
@ -159,8 +159,7 @@ ConcreteSimulation::set_policy(CPUPolicy* p)
|
|||
{
|
||||
_policy = p;
|
||||
|
||||
if (p != NULL)
|
||||
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p);
|
||||
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue