module Jekyll::Algolia::ErrorHandler

def self.stop(error, context = {})

happened to the display
context - A hash of values that will be passed from where the error
error - The caught error

a human-readable error message
Public: Stop the execution of the plugin and display if possible
def self.stop(error, context = {})
  Logger.verbose("E:[jekyll-algolia] Raw error: #{error}")
  identified_error = identify(error, context)
  if identified_error == false
    Logger.log('E:[jekyll-algolia] Error:')
    Logger.log("E:#{error}")
  else
    Logger.known_message(
      identified_error[:name],
      identified_error[:details]
    )
  end
  exit 1
end