Exception: ROCrate::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ro_crate/model/exceptions/exception.rb

Direct Known Subclasses

ReadException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, _inner_exception = nil) ⇒ Exception

Returns a new instance of Exception.



5
6
7
8
9
10
11
12
13
# File 'lib/ro_crate/model/exceptions/exception.rb', line 5

def initialize(message, _inner_exception = nil)
  if _inner_exception
    @inner_exception = _inner_exception
    super("#{message}: #{@inner_exception.class.name} - #{@inner_exception.message}")
    set_backtrace(@inner_exception.backtrace)
  else
    super(message)
  end
end

Instance Attribute Details

#inner_exceptionObject (readonly)

Returns the value of attribute inner_exception.



3
4
5
# File 'lib/ro_crate/model/exceptions/exception.rb', line 3

def inner_exception
  @inner_exception
end