Parent

Methods

Class Index [+]

Quicksearch

Vuzit::Exception

Vuzit library exception handler class.

Attributes

message[R]

The web service error message

code[R]

The web service error code

Public Class Methods

new(message, code = 0) click to toggle source

Constructor for errors.

Example:

 begin
   doc = Vuzit::Document.find("DOCUMENT_ID")
 rescue Vuzit::Exception => ex
   puts "Error code: #{ex.code}, message: #{ex.message}"
 end
# File lib/vuzitruby/exception.rb, line 20
    def initialize(message, code = 0)
      @message = message
      @code = code
    end

Public Instance Methods

to_s() click to toggle source

Returns the string representation of the error in this format:

 Vuzit::Exception: [CODE]: MESSAGE
# File lib/vuzitruby/exception.rb, line 28
    def to_s
      return "Vuzit::Exception: [#{@code}]: #{@message}";
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.