Exception: Pekky::Format::LibaryMissingError

Inherits:
PekkyError
  • Object
show all
Defined in:
lib/pekky/format.rb

Overview

A custom error class for encapsulating load errors, so we can add a custom error message when a renderer can’t find the library it needs. This is to prevent users being presented with a potentially confusing message.

Instance Attribute Summary

Attributes inherited from PekkyError

#message, #title

Instance Method Summary collapse

Constructor Details

#initialize(klass, error) ⇒ LibaryMissingError

Returns a new instance of LibaryMissingError.



11
12
13
# File 'lib/pekky/format.rb', line 11

def initialize(klass, error)
  @message = "While trying to use the #{klass.to_s} transformer, we got this error:\n #{error.message}"
end