Exception: Rubino::Interrupted

Inherits:
Error
  • Object
show all
Defined in:
lib/rubino/errors.rb

Overview

An in-progress LLM turn was aborted. reason distinguishes a deliberate user interrupt (Esc / Ctrl+C in the chat TUI — :user) from an EXTERNAL teardown (SIGTERM/SIGHUP from systemd, a terminal close, or a supervisor kill — :external). Both are caught by the Loop/Lifecycle so partial content can still be persisted and the UI returns to a ready state cleanly, but the result LABEL must not claim “interrupted by user” when no user interrupted (#361b). Default stays :user with the historical message for compatibility.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, reason: :user) ⇒ Interrupted

Returns a new instance of Interrupted.



91
92
93
94
# File 'lib/rubino/errors.rb', line 91

def initialize(message = nil, reason: :user)
  @reason = reason
  super(message || default_message(reason))
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



89
90
91
# File 'lib/rubino/errors.rb', line 89

def reason
  @reason
end