lib/em-midori/sandbox.rb in em-midori-0.1.3 vs lib/em-midori/sandbox.rb in em-midori-0.1.4

- old
+ new

@@ -1,19 +1,19 @@ class Midori::Sandbox class << self def class_initialize @handlers = Hash.new - @handlers[Midori::Error::InternalError] = proc {|_e| Midori::Response.new(500, {}, 'Internal Server Error')} - @handlers[Midori::Error::NotFound] = proc {|_e| Midori::Response.new(404, {}, '404 Not Found')} + @handlers[Midori::Exception::InternalError] = proc {|_e| Midori::Response.new(500, {}, 'Internal Server Error')} + @handlers[Midori::Exception::NotFound] = proc {|_e| Midori::Response.new(404, {}, '404 Not Found')} end def add_rule(class_name, block) @handlers[class_name] = block end def capture(error) if @handlers[error.class].nil? - @handlers[Midori::Error::InternalError].call(error) + @handlers[Midori::Exception::InternalError].call(error) else @handlers[error.class].call(error) end end