Exception: SL::PluginError
- Inherits:
-
StandardError
- Object
- StandardError
- SL::PluginError
- Defined in:
- lib/searchlink/exceptions.rb
Overview
Custom plugin error
Instance Method Summary collapse
-
#initialize(msg = nil, plugin: nil) ⇒ PluginError
constructor
A new instance of PluginError.
Constructor Details
#initialize(msg = nil, plugin: nil) ⇒ PluginError
Returns a new instance of PluginError.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/searchlink/exceptions.rb', line 18 def initialize(msg = nil, plugin: nil) plugin = %("#{plugin}") if plugin plugin ||= 'plugin' msg = ": #{msg}" if msg puts "Error in #{plugin}#{msg}" super() Process.exit 1 end |