Method: Chef::Application.fatal!

Defined in:
lib/chef/application.rb

.fatal!(msg, err = nil) ⇒ Object

Log a fatal error message to both STDERR and the Logger, exit the application



401
402
403
404
405
406
407
# File 'lib/chef/application.rb', line 401

def fatal!(msg, err = nil)
  if Chef::Config[:always_dump_stacktrace]
    msg << "\n#{err.backtrace.join("\n")}"
  end
  logger.fatal(msg)
  Process.exit(normalize_exit_code(err))
end