Exception: ClaudeCodeSDK::CLIJSONDecodeError

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

Overview

Raised when JSON parsing fails

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, line: nil) ⇒ CLIJSONDecodeError

Returns a new instance of CLIJSONDecodeError.



40
41
42
43
# File 'lib/claude_code_sdk/errors.rb', line 40

def initialize(message, line: nil)
  @line = line
  super(line ? "#{message}\nLine: #{line}" : message)
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



38
39
40
# File 'lib/claude_code_sdk/errors.rb', line 38

def line
  @line
end