Exception: Roby::ExceptionBase
- Includes:
- DRoby::V5::ExceptionBaseDumper
- Defined in:
- lib/roby/standard_errors.rb,
lib/roby/droby/enable.rb
Overview
Base class for all Roby exceptions
Direct Known Subclasses
Instance Attribute Summary collapse
-
#original_exceptions ⇒ Array<Exception>
List of Exception objects that caused this.
Instance Method Summary collapse
- #each_original_exception(&block) ⇒ Object
-
#initialize(exceptions = []) ⇒ ExceptionBase
constructor
A new instance of ExceptionBase.
- #report_exceptions_from(object) ⇒ Object
Methods included from DRoby::V5::ExceptionBaseDumper
Methods included from DRoby::V5::Builtins::ExceptionDumper
Constructor Details
#initialize(exceptions = []) ⇒ ExceptionBase
Returns a new instance of ExceptionBase.
53 54 55 56 57 |
# File 'lib/roby/standard_errors.rb', line 53 def initialize(exceptions = []) super() @original_exceptions = exceptions end |
Instance Attribute Details
#original_exceptions ⇒ Array<Exception>
List of Exception objects that caused this
51 52 53 |
# File 'lib/roby/standard_errors.rb', line 51 def original_exceptions @original_exceptions end |
Instance Method Details
#each_original_exception(&block) ⇒ Object
59 60 61 |
# File 'lib/roby/standard_errors.rb', line 59 def each_original_exception(&block) @original_exceptions.each(&block) end |
#report_exceptions_from(object) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/roby/standard_errors.rb', line 63 def report_exceptions_from(object) if object.kind_of?(Exception) original_exceptions << object elsif object.respond_to?(:report_exceptions_on) object.report_exceptions_on(self) elsif object.respond_to?(:context) && object.context object.context.each do |c| report_exceptions_from(c) end elsif object.respond_to?(:failure_reason) report_exceptions_from(object.failure_reason) end end |