提交 59a53f45 编写于 作者: A Aaron Patterson

remain backwards compatible, exception can be constructed with no arguments

上级 cde326bc
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册