Exception: ClaudeCodeSDK::ProcessError
- Defined in:
- lib/claude_code_sdk/errors.rb
Overview
Raised when the CLI process fails
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
Instance Method Summary collapse
-
#initialize(message, exit_code: nil, stderr: nil) ⇒ ProcessError
constructor
A new instance of ProcessError.
Constructor Details
#initialize(message, exit_code: nil, stderr: nil) ⇒ ProcessError
Returns a new instance of ProcessError.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/claude_code_sdk/errors.rb', line 24 def initialize(, exit_code: nil, stderr: nil) @exit_code = exit_code @stderr = stderr = += " (exit code: #{exit_code})" if exit_code += "\nError output: #{stderr}" if stderr && !stderr.empty? super() end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
22 23 24 |
# File 'lib/claude_code_sdk/errors.rb', line 22 def exit_code @exit_code end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
22 23 24 |
# File 'lib/claude_code_sdk/errors.rb', line 22 def stderr @stderr end |