Exception: Inforouter::Errors::InforouterError
- Inherits:
-
StandardError
- Object
- StandardError
- Inforouter::Errors::InforouterError
- Defined in:
- lib/inforouter/errors/inforouter_error.rb
Overview
Default parent infoRouter error for all custom errors. This handles the base key for the translations and provides the convenience method for translating the messages.
Generously borrowed from Mongoid.
Direct Known Subclasses
ApiError, MissingConfigError, MissingConfigOption, SOAPError, UnexpectedSOAPResponse
Constant Summary collapse
- BASE_KEY =
:nodoc:
'inforouter.errors.messages'
Instance Method Summary collapse
-
#compose_message(key, attributes = {}) ⇒ String
Compose the message.
Instance Method Details
#compose_message(key, attributes = {}) ⇒ String
Compose the message.
18 19 20 21 22 23 24 25 26 |
# File 'lib/inforouter/errors/inforouter_error.rb', line 18 def (key, attributes = {}) @problem = problem(key, attributes) @summary = summary(key, attributes) @resolution = resolution(key, attributes) "\nProblem:\n #{@problem}" + "\nSummary:\n #{@summary}" + "\nResolution:\n #{@resolution}" end |