| Quintiq file version 2.0 | 
| #parent: #root | 
| Method HandleFailure ( | 
|   LibOpt_Task task | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     snapshotkpi := this.LogKPI( task, Translations::LibOpt_SnapshotError_Type() );  | 
|     snapshotkpi.astype( SnapshotMacroPlannerOptimizer ).IsAccepted( true );  | 
|      | 
|     // Resetting the optimizer status on the scenario | 
|     runcontext := RunContextForCapacityPlanning::GetRunContextCapacityPlanning( task.Run() );  | 
|     if ( not runcontext.IsMetaIteration() )  | 
|     { | 
|       sm := Util::GetScenarioManagerStream();  | 
|       sm->UpdateScenarioOptimizerStatus( this.MacroPlan().MDSID(), "", "", "" ); | 
|     } | 
|      | 
|     if ( runcontext.IsMetaIteration() and RunContextMeta::GetRunContextMeta( task.Run( )).OptionStopOnRollback() )  | 
|     { | 
|       this.Run().BreakpointEvent( relnew ); | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |