Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remain backwards compatible, exception can be constructed with no arg…

…uments
  • Loading branch information...
commit 59a53f45258d10e689fc9dc0f0cf18746dd13579 1 parent cde326b
Aaron Patterson tenderlove authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_controller/metal/exceptions.rb
4 actionpack/lib/action_controller/metal/exceptions.rb
View
@@ -5,7 +5,9 @@ class ActionControllerError < StandardError #:nodoc:
class BadRequest < ActionControllerError #:nodoc:
attr_reader :original_exception
- def initialize(type, e)
+ def initialize(type = nil, e = nil)
+ return super() unless type && e
+
super("Invalid #{type} parameters: #{e.message}")
@original_exception = e
set_backtrace e.backtrace
Please sign in to comment.
Something went wrong with that request. Please try again.