Sha256: 5b6c5dc5dd4eed761b899c22b680df79a6aaa9ff61499b8e5976249d0dea2fa4

Contents?: true

Size: 291 Bytes

Versions: 16

Compression:

Stored size: 291 Bytes

Contents

module Landable
  class Error < StandardError

    STATUS_CODE = 500

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

    def status_code
      self.class::STATUS_CODE
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 lib/landable/error.rb
landable-1.12.3 lib/landable/error.rb
landable-1.12.2 lib/landable/error.rb
landable-1.12.1 lib/landable/error.rb
landable-1.11.1 lib/landable/error.rb
landable-1.11.0 lib/landable/error.rb
landable-1.10.0.rc2 lib/landable/error.rb
landable-1.10.0.rc1 lib/landable/error.rb
landable-1.9.2 lib/landable/error.rb
landable-1.9.1 lib/landable/error.rb
landable-1.9.0 lib/landable/error.rb
landable-1.9.0.rc2 lib/landable/error.rb
landable-1.9.0.rc1 lib/landable/error.rb
landable-1.8.0 lib/landable/error.rb
landable-1.7.1.rc1 lib/landable/error.rb
landable-1.7.0 lib/landable/error.rb