Exception: LLM::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- LLM::Error
- Defined in:
- lib/llm/error.rb
Overview
The superclass of all LLM errors
Instance Attribute Summary collapse
-
#response ⇒ Net::HTTPResponse?
Returns the response associated with an error, or nil.
Instance Method Summary collapse
-
#initialize ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize ⇒ Error
Returns a new instance of Error.
12 13 14 15 |
# File 'lib/llm/error.rb', line 12 def initialize(...) block_given? ? yield(self) : nil super end |
Instance Attribute Details
#response ⇒ Net::HTTPResponse?
Returns the response associated with an error, or nil
10 11 12 |
# File 'lib/llm/error.rb', line 10 def response @response end |
Instance Method Details
#message ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/llm/error.rb', line 17 def if response [super, response.body].join("\n") else super end end |