Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | module Koine |
||
3 | class ArgumentError < ::ArgumentError |
||
4 | attr_reader :attribute_name |
||
5 | |||
6 | def initialize(error, attribute_name = nil) |
||
7 | @attribute_name = attribute_name |
||
8 | |||
9 | if error.is_a?(Exception) |
||
10 | super(error.message) |
||
11 | set_backtrace(error.backtrace) |
||
12 | return |
||
13 | end |
||
14 | |||
15 | super(error) |
||
16 | end |
||
17 | end |
||
18 | end |
||
20 |