Class: Protocol::HTTP::Executor::RemoteError

Inherits:
RemoteError
  • Object
show all
Defined in:
lib/protocol/http/executor/error.rb

Overview

Raised when the remote execution context reports an error.

Direct Known Subclasses

ClosedError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description) ⇒ RemoteError

Initialize a remote error from its description.



28
29
30
31
32
33
# File 'lib/protocol/http/executor/error.rb', line 28

def initialize(description)
	@description = description
	
	super("#{description[:class]}: #{description[:message]}")
	self.set_backtrace(description[:backtrace]) if description[:backtrace]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



36
37
38
# File 'lib/protocol/http/executor/error.rb', line 36

def description
  @description
end

Class Method Details

.dump(error) ⇒ Object

Convert an exception into a transport-safe description.



17
18
19
20
21
22
23
# File 'lib/protocol/http/executor/error.rb', line 17

def self.dump(error)
	{
		class: error.class.name,
		message: error.message,
		backtrace: error.backtrace,
	}
end

Instance Method Details

#The remote error description.=(remoteerrordescription. = (value)) ⇒ Object



36
# File 'lib/protocol/http/executor/error.rb', line 36

attr :description