Exception: Raif::Errors::PromptTemplateError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/raif/errors/prompt_template_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template_path:, original_error:) ⇒ PromptTemplateError

Returns a new instance of PromptTemplateError.



8
9
10
11
12
# File 'lib/raif/errors/prompt_template_error.rb', line 8

def initialize(template_path:, original_error:)
  @template_path = template_path
  @original_error = original_error
  super("Error rendering prompt template '#{template_path}': #{original_error.class}: #{original_error.message}")
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



6
7
8
# File 'lib/raif/errors/prompt_template_error.rb', line 6

def original_error
  @original_error
end

#template_pathObject (readonly)

Returns the value of attribute template_path.



6
7
8
# File 'lib/raif/errors/prompt_template_error.rb', line 6

def template_path
  @template_path
end