Exception: ActionController::BadRequest

Inherits:
ActionControllerError show all
Defined in:
actionpack/lib/action_controller/metal/exceptions.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, e = nil) ⇒ BadRequest

Returns a new instance of BadRequest.


6
7
8
9
10
11
12
13
14
# File 'actionpack/lib/action_controller/metal/exceptions.rb', line 6

def initialize(msg = nil, e = nil)
  if e
    ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \
                                    "Exceptions will automatically capture the original exception.", caller)
  end

  super(msg)
  set_backtrace $!.backtrace if $!
end

Instance Method Details

#original_exceptionObject


16
17
18
19
# File 'actionpack/lib/action_controller/metal/exceptions.rb', line 16

def original_exception
  ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
  cause
end