module Nginxtra::Error

Public Class Methods

print_error(thor, options) click to toggle source
protect(thor) { || ... } click to toggle source
# File lib/nginxtra/error.rb, line 126
def protect(thor)
  yield
rescue Nginxtra::Error::Base => e
  e.output thor
  raise if thor.options["trace"]
rescue
  print_error thor, header: "An unexpected error occurred!"
  raise if thor.options["trace"]
end