Sha256: c8faa185e1404df1bde33aba5cf76c663178214639c321c46f98668c1e5872c0

Contents?: true

Size: 1.78 KB

Versions: 35

Compression:

Stored size: 1.78 KB

Contents

module ActionController
  class ActionControllerError < StandardError #:nodoc:
  end

  class BadRequest < ActionControllerError #:nodoc:
    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

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

  class RenderError < ActionControllerError #:nodoc:
  end

  class RoutingError < ActionControllerError #:nodoc:
    attr_reader :failures
    def initialize(message, failures=[])
      super(message)
      @failures = failures
    end
  end

  class ActionController::UrlGenerationError < ActionControllerError #:nodoc:
  end

  class MethodNotAllowed < ActionControllerError #:nodoc:
    def initialize(*allowed_methods)
      super("Only #{allowed_methods.to_sentence(:locale => :en)} requests are allowed.")
    end
  end

  class NotImplemented < MethodNotAllowed #:nodoc:
  end

  class UnknownController < ActionControllerError #:nodoc:
  end

  class MissingFile < ActionControllerError #:nodoc:
  end

  class SessionOverflowError < ActionControllerError #:nodoc:
    DEFAULT_MESSAGE = 'Your session data is larger than the data column in which it is to be stored. You must increase the size of your data column if you intend to store large data.'

    def initialize(message = nil)
      super(message || DEFAULT_MESSAGE)
    end
  end

  class UnknownHttpMethod < ActionControllerError #:nodoc:
  end

  class UnknownFormat < ActionControllerError #:nodoc:
  end
end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
actionpack-5.0.7.2 lib/action_controller/metal/exceptions.rb
actionpack-5.0.7.1 lib/action_controller/metal/exceptions.rb
actionpack-5.0.7 lib/action_controller/metal/exceptions.rb
actionpack-5.0.6 lib/action_controller/metal/exceptions.rb
actionpack-5.0.6.rc1 lib/action_controller/metal/exceptions.rb
actionpack-5.0.5 lib/action_controller/metal/exceptions.rb
actionpack-5.0.5.rc2 lib/action_controller/metal/exceptions.rb
actionpack-5.0.5.rc1 lib/action_controller/metal/exceptions.rb
actionpack-5.0.4 lib/action_controller/metal/exceptions.rb
actionpack-5.0.4.rc1 lib/action_controller/metal/exceptions.rb
actionpack-5.0.3 lib/action_controller/metal/exceptions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/actionpack-5.0.2/lib/action_controller/metal/exceptions.rb
actionpack-5.0.2 lib/action_controller/metal/exceptions.rb
actionpack-5.0.2.rc1 lib/action_controller/metal/exceptions.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.1/lib/action_controller/metal/exceptions.rb