Exception: RubyClaude::ExecutionError

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

Overview

Raised on a non-zero exit status, or on a result payload that reports is_error: true. Carries the exit status and captured stderr.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, stderr: nil) ⇒ ExecutionError

Returns a new instance of ExecutionError.

Parameters:

  • message (String, nil) (defaults to: nil)
  • status (Integer, nil) (defaults to: nil)
  • stderr (String, nil) (defaults to: nil)


33
34
35
36
37
# File 'lib/ruby_claude/errors.rb', line 33

def initialize(message = nil, status: nil, stderr: nil)
  @status = status
  @stderr = stderr
  super(message)
end

Instance Attribute Details

#statusInteger? (readonly)

Returns the child process exit status, when known.

Returns:

  • (Integer, nil)

    the child process exit status, when known



25
26
27
# File 'lib/ruby_claude/errors.rb', line 25

def status
  @status
end

#stderrString? (readonly)

Returns captured standard error output, when available.

Returns:

  • (String, nil)

    captured standard error output, when available



28
29
30
# File 'lib/ruby_claude/errors.rb', line 28

def stderr
  @stderr
end