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.



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

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

Instance Method Details

#status_codeObject



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

def status_code
  self.class::STATUS_CODE
end