Exception: TezosClient::OperationFailure

Inherits:
Exception
  • Object
show all
Includes:
Logger
Defined in:
lib/tezos_client/exceptions.rb

Direct Known Subclasses

ScriptRuntimeError, TezBalanceTooLow

Constant Summary

Constants included from Logger

Logger::FILTERED_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logger

#log, #tezos_contents_log, #tezos_contents_log_filter

Constructor Details

#initialize(metadata:, errors:, status:) ⇒ OperationFailure

Returns a new instance of OperationFailure.



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/tezos_client/exceptions.rb', line 39

def initialize(metadata:, errors:, status:)
   = 
  @errors = errors
  @status = status

  error = errors[0]

  if @message.nil?
    @message = "failure #{status}: #{tezos_contents_log(error).pretty_inspect}"
  end

  super(message)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



35
36
37
# File 'lib/tezos_client/exceptions.rb', line 35

def errors
  @errors
end

#messageObject (readonly)

Returns the value of attribute message.



37
38
39
# File 'lib/tezos_client/exceptions.rb', line 37

def message
  @message
end

#metadataObject (readonly)

Returns the value of attribute metadata.



34
35
36
# File 'lib/tezos_client/exceptions.rb', line 34

def 
  
end

#statusObject (readonly)

Returns the value of attribute status.



36
37
38
# File 'lib/tezos_client/exceptions.rb', line 36

def status
  @status
end