Sha256: 2fd174813201e06a57b70b868d4441d722096fbc77ac69616e41a63c266e6b86

Contents?: true

Size: 362 Bytes

Versions: 1

Compression:

Stored size: 362 Bytes

Contents

require 'sinatra/base'
require 'sinatra/errorcodes/version'

require_relative '../4xx_errors.rb'
require_relative '../5xx_errors.rb'
require_relative '../error_base.rb'

module Sinatra
  include HTTPError

  module Errorcodes
    def handle_errorcode(e)
      if e.is_a? ErrorBase
        halt e.code, e.message
      end
    end
  end

  helpers Errorcodes
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-errorcodes-0.1.2 lib/sinatra/errorcodes.rb