Exception: Roby::TaskEmergencyTermination
- Inherits:
-
LocalizedError
- Object
- RuntimeError
- ExceptionBase
- LocalizedError
- Roby::TaskEmergencyTermination
- Defined in:
- lib/roby/standard_errors.rb
Overview
Raised when an error occurs on a task while we were terminating it
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Attributes inherited from LocalizedError
#failed_event, #failed_generator, #failed_task, #failure_point
Attributes inherited from ExceptionBase
Instance Method Summary collapse
-
#initialize(task, reason, quarantined = false) ⇒ TaskEmergencyTermination
constructor
A new instance of TaskEmergencyTermination.
- #pretty_print(pp) ⇒ Object
- #quarantined? ⇒ Boolean
Methods inherited from LocalizedError
#fatal?, #involved_plan_object?, match, #propagated?, #to_execution_exception, to_execution_exception_matcher
Methods included from DRoby::V5::LocalizedErrorDumper
Methods inherited from ExceptionBase
#each_original_exception, #report_exceptions_from
Methods included from DRoby::V5::ExceptionBaseDumper
Methods included from DRoby::V5::Builtins::ExceptionDumper
Constructor Details
#initialize(task, reason, quarantined = false) ⇒ TaskEmergencyTermination
Returns a new instance of TaskEmergencyTermination.
214 215 216 217 218 219 220 |
# File 'lib/roby/standard_errors.rb', line 214 def initialize(task, reason, quarantined = false) super(task) @quarantined = quarantined @reason = reason report_exceptions_from(reason) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
208 209 210 |
# File 'lib/roby/standard_errors.rb', line 208 def reason @reason end |
Instance Method Details
#pretty_print(pp) ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/roby/standard_errors.rb', line 222 def pretty_print(pp) pp.text "The following task is being terminated because of an internal error" pp.breakable if quarantined? pp.text "It has been put under quarantine" else pp.text "It is not yet put under quarantine" end pp.breakable super pp.breakable if !original_exceptions.include?(reason) reason.pretty_print(pp) end end |
#quarantined? ⇒ Boolean
210 211 212 |
# File 'lib/roby/standard_errors.rb', line 210 def quarantined? !!@quarantined end |