Exception: BetterTranslate::Error Abstract
- Inherits:
-
StandardError
- Object
- StandardError
- BetterTranslate::Error
- Defined in:
- lib/better_translate/errors.rb
Overview
This class is abstract.
Base error class for all BetterTranslate errors
Direct Known Subclasses
ApiError, ConfigurationError, FileError, JsonError, ProviderError, ProviderNotFoundError, TranslationError, ValidationError, YamlError
Instance Attribute Summary collapse
-
#context ⇒ Hash
readonly
Additional context about the error.
Instance Method Summary collapse
-
#initialize(message = nil, context: {}) ⇒ Error
constructor
Initialize a new error with optional context.
Constructor Details
#initialize(message = nil, context: {}) ⇒ Error
Initialize a new error with optional context
15 16 17 18 |
# File 'lib/better_translate/errors.rb', line 15 def initialize( = nil, context: {}) @context = context super() end |
Instance Attribute Details
#context ⇒ Hash (readonly)
Returns Additional context about the error.
9 10 11 |
# File 'lib/better_translate/errors.rb', line 9 def context @context end |