Exception: Grpc::Client::ORiN3::MessageClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/grpc/client/orin3/message_client_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arg1, arg2 = nil) ⇒ MessageClientError

Returns a new instance of MessageClientError.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/grpc/client/orin3/message_client_error.rb', line 7

def initialize(arg1, arg2 = nil)
  if arg2.nil? && arg1.is_a?(StandardError)
    @result_code = :UNKNOWN
    @detail = arg1.message
    @original_exception = arg1
    super("Code: #{@result_code}, Detail: #{@detail}")
    set_backtrace(arg1.backtrace)
  else
    @result_code = arg1
    @detail = arg2
    super("Code: #{@result_code}, Detail: #{@detail}")
  end
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



5
6
7
# File 'lib/grpc/client/orin3/message_client_error.rb', line 5

def detail
  @detail
end

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



5
6
7
# File 'lib/grpc/client/orin3/message_client_error.rb', line 5

def original_exception
  @original_exception
end

#result_codeObject (readonly)

Returns the value of attribute result_code.



5
6
7
# File 'lib/grpc/client/orin3/message_client_error.rb', line 5

def result_code
  @result_code
end