Exception: PiAgent::TransportClosedError

Inherits:
ProtocolError show all
Defined in:
lib/pi_agent/errors.rb

Overview

Raised when the transport dies out from under the client — child process exit, read-stream EOF, fatal stream error — while requests or event streams are outstanding, and on any request/notify attempted after the death. A caller-initiated Client#close never raises it. #reason carries the transport's short description of what happened (e.g. "process terminated by signal 9").

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason) ⇒ TransportClosedError

Returns a new instance of TransportClosedError.



21
22
23
24
# File 'lib/pi_agent/errors.rb', line 21

def initialize(reason)
  @reason = reason
  super("Transport closed: #{reason}")
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



19
20
21
# File 'lib/pi_agent/errors.rb', line 19

def reason
  @reason
end