Exception: Impostor::ImpostorError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Impostor::ImpostorError
- Defined in:
- lib/impostor/errors.rb
Overview
An application error
Direct Known Subclasses
ConfigError, LoginError, MissingTemplateMethodError, PostError, PostModerated, ThrottledError, TopicError, TopicModerated
Instance Attribute Summary collapse
-
#original_exception ⇒ Object
The original exception.
Instance Method Summary collapse
-
#initialize(e = nil) ⇒ ImpostorError
constructor
Creates a new ImpostorError with
message
andoriginal_exception
.
Constructor Details
#initialize(e = nil) ⇒ ImpostorError
Creates a new ImpostorError with message
and original_exception
16 17 18 19 20 21 |
# File 'lib/impostor/errors.rb', line 16 def initialize(e = nil) exception = e.nil? || e.is_a?(String) ? StandardError.new(e) : e @original_exception = exception = "Impostor error: #{exception.} (#{exception.class})" super end |
Instance Attribute Details
#original_exception ⇒ Object
The original exception
11 12 13 |
# File 'lib/impostor/errors.rb', line 11 def original_exception @original_exception end |