Exception: Clearbooks::ClearbooksfileReadError
- Inherits:
-
ClearbooksError
- Object
- StandardError
- ClearbooksError
- Clearbooks::ClearbooksfileReadError
- Defined in:
- lib/clearbooks/error/errors.rb
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(original_error) ⇒ ClearbooksfileReadError
constructor
A new instance of ClearbooksfileReadError.
- #original_backtrace ⇒ Object
- #status_code ⇒ Object
- #to_s ⇒ Object
Methods inherited from ClearbooksError
Constructor Details
#initialize(original_error) ⇒ ClearbooksfileReadError
Returns a new instance of ClearbooksfileReadError.
93 94 95 96 97 |
# File 'lib/clearbooks/error/errors.rb', line 93 def initialize(original_error) @original_error = original_error @error_message = original_error.to_s @error_backtrace = original_error.backtrace end |
Instance Method Details
#backtrace ⇒ Object
104 105 106 |
# File 'lib/clearbooks/error/errors.rb', line 104 def backtrace Array(@error_backtrace) + Array(original_backtrace) end |
#original_backtrace ⇒ Object
103 |
# File 'lib/clearbooks/error/errors.rb', line 103 alias_method :original_backtrace, :backtrace |
#status_code ⇒ Object
99 100 101 |
# File 'lib/clearbooks/error/errors.rb', line 99 def status_code @original_error.respond_to?(:status_code) ? @original_error.status_code : 113 end |
#to_s ⇒ Object
108 109 110 111 112 113 114 |
# File 'lib/clearbooks/error/errors.rb', line 108 def to_s [ "An error occurred while reading the Clearbooksfile:", "", " #{@error_message}", ].join("\n") end |