Exception: TinyDyno::Errors::TinyDynoError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tiny_dyno/errors/tiny_dyno_error.rb

Constant Summary collapse

BASE_KEY =
"tiny_dyno.errors.messages"

Instance Method Summary collapse

Instance Method Details

#compose_message(key, attributes) ⇒ String

Compose the message.

Examples:

Create the message

error.compose_message

Returns:

  • (String)

    The composed message.



13
14
15
16
17
18
19
20
21
# File 'lib/tiny_dyno/errors/tiny_dyno_error.rb', line 13

def compose_message(key, attributes)
  @problem = problem(key, attributes)
  @summary = summary(key, attributes)
  @resolution = resolution(key, attributes)

  "\nProblem:\n  #{@problem}"+
      "\nSummary:\n  #{@summary}"+
      "\nResolution:\n  #{@resolution}"
end