class Diecut::ErrorHandling::Base
Public Instance Methods
handle_exception(ex)
click to toggle source
# File lib/diecut/errors.rb, line 36 def handle_exception(ex) if Error === ex issue(ex.message) else raise end end
invalid_plugin(name, context_path, value)
click to toggle source
# File lib/diecut/errors.rb, line 28 def invalid_plugin(name, context_path, value) issue invalid_plugin_message(name, context_path, value) end
invalid_plugin_message(name, context_path, value)
click to toggle source
# File lib/diecut/errors.rb, line 12 def invalid_plugin_message(name, context_path, value) "Default on #{context_path.inspect} from plugin #{name} has both a simple default value (#{value}) and a dynamic block value, which isn't allowed." end
missing_context_field(plugin_name, option_name, context_path)
click to toggle source
# File lib/diecut/errors.rb, line 20 def missing_context_field(plugin_name, option_name, context_path) issue(missing_context_field_message(option_name, context_path)) end
missing_context_field_message(option_name, context_path)
click to toggle source
# File lib/diecut/errors.rb, line 4 def missing_context_field_message(option_name, context_path) "No template uses a value at #{context_path.inspect}, provided by #{option_name}" end
unregistered_plugin_source(source_path)
click to toggle source
# File lib/diecut/errors.rb, line 32 def unregistered_plugin_source(source_path) issue unregistered_plugin_source_message(source_path) end
unregistered_plugin_source_message(source_path)
click to toggle source
# File lib/diecut/errors.rb, line 16 def unregistered_plugin_source_message(source_path) "Couldn't find source of plugin which appears to be defined at #{source_path}" end
unused_default(plugin_name, context_path)
click to toggle source
# File lib/diecut/errors.rb, line 24 def unused_default(plugin_name, context_path) issue(usused_default_message(context_path)) end
unused_default_message(context_path)
click to toggle source
# File lib/diecut/errors.rb, line 8 def unused_default_message(context_path) "No template uses a value at #{context_path.inspect}, provided as a default" end