Exception: Landable::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Landable::Error
- Defined in:
- lib/landable/error.rb
Direct Known Subclasses
Constant Summary collapse
- STATUS_CODE =
500
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ Error
constructor
A new instance of Error.
- #status_code ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ Error
Returns a new instance of Error.
6 7 8 9 |
# File 'lib/landable/error.rb', line 6 def initialize = nil ||= "Status code: #{status_code} (Hint: rescue this in your ApplicationController)" super end |
Instance Method Details
#status_code ⇒ Object
11 12 13 |
# File 'lib/landable/error.rb', line 11 def status_code self.class::STATUS_CODE end |