Exception: BetterTranslate::JsonError

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

Overview

Raised when JSON parsing fails

Examples:

JSON syntax error

raise JsonError.new(
  "Invalid JSON syntax",
  context: { file_path: "config/locales/en.json", error: "unexpected token" }
)

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