remain backwards compatible, exception can be constructed with no arguments
This commit is contained in:
parent
cde326bcef
commit
59a53f4525
|
@ -5,7 +5,9 @@ module ActionController
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue