Exception: BetterTranslate::TranslationError

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

Overview

Raised when translation fails

Examples:

Translation error

raise TranslationError.new(
  "Failed to translate text",
  context: { text: "Hello", target_lang: "it" }
)

Instance Attribute Summary

Attributes inherited from Error

#context

Method Summary

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from BetterTranslate::Error