Exception: Buildr::TestFramework::TestResult::Error
- Defined in:
- lib/buildr/java/test_result.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, backtrace) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, backtrace) ⇒ Error
Returns a new instance of Error.
26 27 28 29 30 |
# File 'lib/buildr/java/test_result.rb', line 26 def initialize(, backtrace) @message = @backtrace = backtrace set_backtrace backtrace end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
25 26 27 |
# File 'lib/buildr/java/test_result.rb', line 25 def backtrace @backtrace end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
25 26 27 |
# File 'lib/buildr/java/test_result.rb', line 25 def @message end |
Class Method Details
.dump_yaml(file, e) ⇒ Object
32 33 34 35 |
# File 'lib/buildr/java/test_result.rb', line 32 def self.dump_yaml(file, e) FileUtils.mkdir_p File.dirname(file) File.open(file, 'w') { |f| f.puts(YAML.dump(Error.new(e., e.backtrace))) } end |
.guard(file) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/buildr/java/test_result.rb', line 37 def self.guard(file) begin yield rescue => e dump_yaml(file, e) end end |