Sha256: 22ba2119a33502ef6d2dc2dd9057f5943c6643bcb6ec7e7ab6a2658a3332cc2e

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

require 'innate'

class Flawed
  include Innate::Node
  map '/'

  def index
    raise ArgumentError, "No go"
  end

  def i_raise
    100 * "foo"
  end
end

class Errors
  include Innate::Node
  map '/error'

  def internal
    path = request.env['rack.route_exceptions.path_info']
    exception = request.env['rack.route_exceptions.exception']

    format = "Oh my, you just went to %p, something went horribly wrong: %p"
    format % [path, exception.message]
  end
end

Rack::RouteExceptions.route(Exception, '/error/internal')

Innate.start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
manveru-innate-2009.02.06 example/error_handling.rb
manveru-innate-2009.02.21 example/error_handling.rb