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.
222 223 224 225 226 227 228 |
# File 'lib/roby/standard_errors.rb', line 222 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.
216 217 218 |
# File 'lib/roby/standard_errors.rb', line 216 def reason @reason end |
Instance Method Details
#pretty_print(pp) ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/roby/standard_errors.rb', line 230 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 unless original_exceptions.include?(reason) reason.pretty_print(pp) end end |
#quarantined? ⇒ Boolean
218 219 220 |
# File 'lib/roby/standard_errors.rb', line 218 def quarantined? !!@quarantined end |