Commit c71f3d8186de9cbba43c785cc445f7e42adf40b1
1 parent
9075c17a
Exists in
master
and in
29 other branches
[Mezuro] Adding cause error method
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
plugins/mezuro/lib/kalibro/entities/error.rb
1 | class Kalibro::Entities::Error < Kalibro::Entities::Entity | 1 | class Kalibro::Entities::Error < Kalibro::Entities::Entity |
2 | 2 | ||
3 | - attr_accessor :error_class, :message, :stack_trace_element | 3 | + attr_accessor :error_class, :message, :stack_trace_element, :cause |
4 | 4 | ||
5 | def stack_trace_element=(value) | 5 | def stack_trace_element=(value) |
6 | @stack_trace_element = to_entity_array(value, Kalibro::Entities::StackTraceElement) | 6 | @stack_trace_element = to_entity_array(value, Kalibro::Entities::StackTraceElement) |
@@ -14,4 +14,8 @@ class Kalibro::Entities::Error < Kalibro::Entities::Entity | @@ -14,4 +14,8 @@ class Kalibro::Entities::Error < Kalibro::Entities::Entity | ||
14 | @stack_trace_element = stack_trace | 14 | @stack_trace_element = stack_trace |
15 | end | 15 | end |
16 | 16 | ||
17 | -end | ||
18 | \ No newline at end of file | 17 | \ No newline at end of file |
18 | + def cause=(cause_value) | ||
19 | + @cause = to_entity(cause_value, Kalibro::Entities::Error) | ||
20 | + end | ||
21 | + | ||
22 | +end |