Class Exception
In: merb-core/lib/merb-core/controller/exceptions.rb
Parent: Object

Methods

Public Class methods

Returns the action_name that will be invoked on your Exceptions controller when an instance is raised during a request.

Returns

String:The name of the action in the Exceptions controller which will get invoked
  when an instance of this Exception sub/class is raised by an action.

:api: public @overridable

[Source]

    # File merb-core/lib/merb-core/controller/exceptions.rb, line 33
33:   def self.action_name
34:     if self == Exception
35:       return nil unless Object.const_defined?(:Exceptions) && 
36:         Exceptions.method_defined?(:exception)
37:     end
38:     name = self.to_s.split('::').last.snake_case
39:     Object.const_defined?(:Exceptions) && 
40:       Exceptions.method_defined?(name) ? name : superclass.action_name
41:   end

The status that will be sent in the response when an instance is raised during a request. Override this to send a different status.

Returns

Integer:The status code to send in the response. Defaults to 500.

:api: public @overridable

[Source]

    # File merb-core/lib/merb-core/controller/exceptions.rb, line 51
51:   def self.status
52:     500
53:   end

Public Instance methods

Returns the action_name that will be invoked on your Exceptions controller when this exception is raised. Override this method to force a different action to be invoked.

Returns

String:The name of the action in the Exceptions controller which will get invoked
  when this exception is raised during a request.

:api: public @overridable

[Source]

    # File merb-core/lib/merb-core/controller/exceptions.rb, line 11
11:   def action_name() self.class.action_name end

Returns

Boolean:Whether or not this exception is the same as another.

:api: public

[Source]

    # File merb-core/lib/merb-core/controller/exceptions.rb, line 18
18:   def same?(other)
19:     self.class == other.class &&
20:     self.message == other.message &&
21:     self.backtrace == other.backtrace
22:   end

[Validate]