Exception: SimpleRPC::RemoteException

Inherits:
Exception
  • Object
show all
Defined in:
lib/simplerpc/client.rb

Overview

Thrown when the server raises an exception.

The message is set to the server’s exception class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ RemoteException



21
22
23
24
# File 'lib/simplerpc/client.rb', line 21

def initialize(exception)
  super(exception)
  @remote_exception = exception
end

Instance Attribute Details

#remote_exceptionObject (readonly)

Returns the value of attribute remote_exception.



19
20
21
# File 'lib/simplerpc/client.rb', line 19

def remote_exception
  @remote_exception
end

Instance Method Details

#backtraceObject

Return the backtrace from the original (remote) exception



28
29
30
# File 'lib/simplerpc/client.rb', line 28

def backtrace
  @remote_exception.backtrace
end

#to_sObject

Return a string representing the remote exception



33
34
35
# File 'lib/simplerpc/client.rb', line 33

def to_s
  @remote_exception.to_s
end