Exception: ClaudeAgent::JSONDecodeError
- Defined in:
- lib/claude_agent/errors.rb
Overview
Raised when JSON parsing fails
Instance Attribute Summary collapse
-
#raw_content ⇒ Object
readonly
Returns the value of attribute raw_content.
Instance Method Summary collapse
-
#initialize(message = "Failed to decode JSON", raw_content: nil) ⇒ JSONDecodeError
constructor
A new instance of JSONDecodeError.
Constructor Details
#initialize(message = "Failed to decode JSON", raw_content: nil) ⇒ JSONDecodeError
Returns a new instance of JSONDecodeError.
53 54 55 56 57 58 |
# File 'lib/claude_agent/errors.rb', line 53 def initialize( = "Failed to decode JSON", raw_content: nil) @raw_content = raw_content = += "\nContent: #{raw_content[0..200]}..." if raw_content super() end |
Instance Attribute Details
#raw_content ⇒ Object (readonly)
Returns the value of attribute raw_content.
51 52 53 |
# File 'lib/claude_agent/errors.rb', line 51 def raw_content @raw_content end |