Exception: SL::PluginError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/searchlink/exceptions.rb

Overview

Custom plugin error

Instance Method Summary collapse

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