Exception: BEL::LibBEL::LibraryLoadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bel/libbel/library_load_error.rb

Constant Summary collapse

ERROR_MSG =
%Q{
  The C extension library could not be loaded for your platform.

  Host information:

  RUBY_PLATFORM:                #{RUBY_PLATFORM},
  RbConfig::CONFIG['host_os']:  #{RbConfig::CONFIG['host_os']},
  RbConfig::CONFIG['host_cpu']: #{RbConfig::CONFIG['host_cpu']},
  library:                      %s

  Original error:

  Name:                         %s,
  Message:                      %s
}.gsub(/^\s+/, '')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(library_name, cause = $!) ⇒ LibraryLoadError

Returns a new instance of LibraryLoadError.



24
25
26
27
# File 'lib/bel/libbel/library_load_error.rb', line 24

def initialize(library_name, cause=$!)
  super(ERROR_MSG % [library_name, cause.class, cause.message])
  @cause = cause;
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



22
23
24
# File 'lib/bel/libbel/library_load_error.rb', line 22

def cause
  @cause
end