Exception: Rospatent::Errors::ConnectionError

Inherits:
Error
  • Object
show all
Defined in:
lib/rospatent/errors.rb

Overview

Raised for connection-related errors

Direct Known Subclasses

TimeoutError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, original_error = nil) ⇒ ConnectionError

Returns a new instance of ConnectionError.



80
81
82
83
# File 'lib/rospatent/errors.rb', line 80

def initialize(message, original_error = nil)
  @original_error = original_error
  super(message)
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



78
79
80
# File 'lib/rospatent/errors.rb', line 78

def original_error
  @original_error
end

Instance Method Details

#to_sObject



85
86
87
88
89
# File 'lib/rospatent/errors.rb', line 85

def to_s
  msg = super
  msg += " (#{@original_error.class}: #{@original_error.message})" if @original_error
  msg
end