Display original exception and backtraces in logger output
This commit is contained in:
parent
d8201d8509
commit
d87cf25ed2
|
@ -264,6 +264,9 @@ if Vagrant.plugins_init?
|
||||||
Vagrant::Bundler.instance.init!(plugins)
|
Vagrant::Bundler.instance.init!(plugins)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
global_logger.error("Plugin initialization error - #{e.class}: #{e}")
|
global_logger.error("Plugin initialization error - #{e.class}: #{e}")
|
||||||
|
e.backtrace.each do |backtrace_line|
|
||||||
|
global_logger.debug(backtrace_line)
|
||||||
|
end
|
||||||
raise Vagrant::Errors::PluginInitError, message: e.to_s
|
raise Vagrant::Errors::PluginInitError, message: e.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -330,6 +333,10 @@ if Vagrant.plugins_enabled?
|
||||||
::Bundler.require(:plugins)
|
::Bundler.require(:plugins)
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
|
global_logger.error("Plugin loading error: #{e.class} - #{e}")
|
||||||
|
e.backtrace.each do |backtrace_line|
|
||||||
|
global_logger.debug(backtrace_line)
|
||||||
|
end
|
||||||
raise Vagrant::Errors::PluginLoadError, message: e.to_s
|
raise Vagrant::Errors::PluginLoadError, message: e.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue