Exception: ClaudeAgentSDK::CLIJSONDecodeError
- Inherits:
-
ClaudeSDKError
- Object
- StandardError
- ClaudeSDKError
- ClaudeAgentSDK::CLIJSONDecodeError
- Defined in:
- lib/claude_agent_sdk/errors.rb
Overview
Raised when unable to decode JSON from CLI output
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Instance Method Summary collapse
-
#initialize(line, original_error) ⇒ CLIJSONDecodeError
constructor
A new instance of CLIJSONDecodeError.
Constructor Details
#initialize(line, original_error) ⇒ CLIJSONDecodeError
Returns a new instance of CLIJSONDecodeError.
37 38 39 40 41 |
# File 'lib/claude_agent_sdk/errors.rb', line 37 def initialize(line, original_error) @line = line @original_error = original_error super("Failed to decode JSON: #{line[0...100]}...") end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
35 36 37 |
# File 'lib/claude_agent_sdk/errors.rb', line 35 def line @line end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
35 36 37 |
# File 'lib/claude_agent_sdk/errors.rb', line 35 def original_error @original_error end |