Class: Peatio::Wallet::ClientError

Inherits:
Error
  • Object
show all
Defined in:
lib/peatio/wallet/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ex_or_string) ⇒ ClientError

Returns a new instance of ClientError.



9
10
11
12
13
14
15
16
17
18
# File 'lib/peatio/wallet/error.rb', line 9

def initialize(ex_or_string)
  @wrapped_ex = nil

  if ex_or_string.respond_to?(:backtrace)
    super(ex_or_string.message)
    @wrapped_exception = ex_or_string
  else
    super(ex_or_string.to_s)
  end
end

Instance Attribute Details

#wrapped_exObject (readonly)

Returns the value of attribute wrapped_ex.



7
8
9
# File 'lib/peatio/wallet/error.rb', line 7

def wrapped_ex
  @wrapped_ex
end