Exception: NightcrawlerSwift::Exceptions::BaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/nightcrawler_swift/exceptions.rb

Direct Known Subclasses

ConnectionError, NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ BaseError

Returns a new instance of BaseError.



7
8
9
10
# File 'lib/nightcrawler_swift/exceptions.rb', line 7

def initialize exception
  super(exception.is_a?(String) ? exception : exception.message)
  @original_exception = exception
end

Instance Attribute Details

#original_exceptionObject

Returns the value of attribute original_exception.



5
6
7
# File 'lib/nightcrawler_swift/exceptions.rb', line 5

def original_exception
  @original_exception
end