Exception: Phronomy::StreamCallbackError
- Defined in:
- lib/phronomy/stream_callback_error.rb
Overview
Raised when an Application stream callback fails and
stream_callback_error_policy is :fail_task.
This error represents delivery failure, not Agent, LLM, Tool, or FSM
execution failure. The Agent result is retained in #result, and the
original Application exception is available through both
#original_error and Ruby's #cause chain.
Instance Attribute Summary collapse
-
#event_type ⇒ Symbol
readonly
Stream event type handled by the failing callback.
-
#original_error ⇒ Exception
readonly
Original Application callback exception.
-
#result ⇒ Hash?
readonly
Successful or suspended Agent result.
Instance Method Summary collapse
-
#initialize(event_type:, original_error:, result: nil) ⇒ StreamCallbackError
constructor
A new instance of StreamCallbackError.
Constructor Details
#initialize(event_type:, original_error:, result: nil) ⇒ StreamCallbackError
Returns a new instance of StreamCallbackError.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/phronomy/stream_callback_error.rb', line 23 def initialize(event_type:, original_error:, result: nil) @event_type = event_type @original_error = original_error @result = result super( "Stream callback failed while handling #{event_type.inspect}: " \ "#{original_error.class}: #{original_error.}" ) set_backtrace(original_error.backtrace) end |
Instance Attribute Details
#event_type ⇒ Symbol (readonly)
Returns stream event type handled by the failing callback.
15 16 17 |
# File 'lib/phronomy/stream_callback_error.rb', line 15 def event_type @event_type end |
#original_error ⇒ Exception (readonly)
Returns original Application callback exception.
21 22 23 |
# File 'lib/phronomy/stream_callback_error.rb', line 21 def original_error @original_error end |
#result ⇒ Hash? (readonly)
Returns successful or suspended Agent result.
18 19 20 |
# File 'lib/phronomy/stream_callback_error.rb', line 18 def result @result end |