Module: LLM::Rescue Private

Included in:
Intercept::Rescue, MessageFilter::Rescue, Tracer::Rescue
Defined in:
lib/llm/rescue.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#crash(ex:)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • ex (StandardError)


15
16
17
18
19
20
21
22
23
24
# File 'lib/llm/rescue.rb', line 15

def crash(ex:)
  $stderr.puts "Oh no!",
               "#{self.class} has crashed",
               "",
               "[  error     ] #{ex.class}",
               "[  message   ] #{ex.message}",
               "[  backtrace ] ",
               "#{(ex.backtrace || []).take(10).join("\n")}",
               ""
end