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

inherited(subclass)

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

status()

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

status=(num)

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

status?()

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

status()

### Returns

Integer: | The status-code of the error.

@overridable :api: plugin

to_i()

Alias for status

to_i()

Alias for status

[Validate]