Exception: Roby::Test::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/roby/test/error.rb

Overview

Class used to wrap exceptions so that #message returns the pretty-printed version of the message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_error) ⇒ Error

Returns a new instance of Error.



10
11
12
13
14
# File 'lib/roby/test/error.rb', line 10

def initialize(original_error)
    super()

    @original_error = original_error
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



8
9
10
# File 'lib/roby/test/error.rb', line 8

def original_error
  @original_error
end

Instance Method Details

#messageObject



16
17
18
# File 'lib/roby/test/error.rb', line 16

def message
    [super].concat(Roby.format_exception(original_error)).join("\n")
end