Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::LoadError

This error is raised when a needed library is not found.

Attributes

gem[R]

The name of the Rubygem that provides the missing library.

library[R]

The name of the library that is missing.

Public Class Methods

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

Create a new LoadError using the provided values.

If library_or_error is a String, it is treated as the missing library name and an approriate error message is created. If it is an exception, the exception is wrapped.

# File lib/webgen/error.rb, line 102
def initialize(library_or_error, class_name = nil, alcn = nil, gem = nil)
  if library_or_error.kind_of?(String)
    msg = "The needed library '#{library_or_error}' is missing."
    msg += " You can install it via rubygems with 'gem install #{gem}'!" if gem
    super(msg, class_name, alcn)
    @library = library_or_error
  else
    super(library_or_error, class_name, alcn)
    @library = nil
  end
  @gem = gem
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.