Exception: Landable::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/landable/error.rb

Direct Known Subclasses

Page::Errors::GoneError

Constant Summary collapse

STATUS_CODE =
500

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ Error

Returns a new instance of Error.



5
6
7
8
# File 'lib/landable/error.rb', line 5

def initialize(message = nil)
  message ||= "Status code: #{status_code} (Hint: rescue this in your ApplicationController)"
  super
end

Instance Method Details

#status_codeObject



10
11
12
# File 'lib/landable/error.rb', line 10

def status_code
  self.class::STATUS_CODE
end