class 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, location = nil, path = nil, gem = nil) click to toggle source

Create a new LoadError.

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.

Calls superclass method Webgen::Error::new
    # File lib/webgen/error.rb
112 def initialize(library_or_error, location = nil, path = nil, gem = nil)
113   if library_or_error.kind_of?(String)
114     msg = "The needed library '#{library_or_error}' is missing."
115     msg << " You can install it with rubygems by running 'gem install #{gem}'!" if gem
116     super(msg, location, path)
117     @library = library_or_error
118   else
119     super(library_or_error, location, path)
120     @library = nil
121   end
122   @gem = gem
123 end