Parent

Methods

Class Index [+]

Quicksearch

Webgen::Error

Custom webgen error.

Attributes

class_name[R]

The name of the class where the error happened.

alcn[RW]

This is either the source path or the node alcn which is responsible for the error.

plain_message[R]

The plain error message.

Public Class Methods

new(msg_or_error, class_name = nil, alcn = nil) click to toggle source

Create a new Error using the provided values.

If msg_or_error is a String, it is treated as the error message. If it is an exception, the exception is wrapped.

    # File lib/webgen/error.rb, line 21
21:     def initialize(msg_or_error, class_name = nil, alcn = nil)
22:       if msg_or_error.kind_of?(String)
23:         super(msg_or_error)
24:         @plain_message = msg_or_error
25:       else
26:         super(msg_or_error.message)
27:         set_backtrace(msg_or_error.backtrace)
28:         @plain_message = msg_or_error.message
29:       end
30:       @class_name, @alcn = class_name, (alcn.kind_of?(Node) ? alcn.to_s : alcn)
31:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.