Class Merb::ControllerExceptions::Base
In: lib/merb-core/controller/exceptions.rb
Parent: StandardError

Methods

inherited   status   status   status=   status?   to_i   to_i  

Public Class methods

Registers any subclasses with status codes for easy lookup by set_status in Merb::Controller.

Inheritance ensures this method gets inherited by any subclasses, so it goes all the way down the chain of inheritance.

Parameters

subclass<Merb::ControllerExceptions::Base>:The Exception class that is inheriting from Merb::ControllerExceptions::Base

:api: public

Get the actual status-code for an Exception class.

As usual, this can come from a constant upwards in the inheritance chain.

Returns

Fixnum:The status code of this exception.

:api: public

Set the actual status-code for an Exception class.

If possible, set the STATUS constant, and update any previously registered (inherited) status-code.

Parameters

num<~to_i>:The status code

Returns

(Integer, nil):The status set on this exception, or nil if a status was already set.

:api: private

See if a status-code has been defined (on self explicitly).

Returns

Boolean:Whether a status code has been set

:api: private

Public Instance methods

Returns

Integer:The status-code of the error.

@overridable :api: plugin

to_i()

Alias for status

to_i()

Alias for status

[Validate]