Raise Vagrant error
This commit is contained in:
parent
0dcefddae4
commit
c70da0f548
@ -85,7 +85,9 @@ module VagrantPlugins
|
||||
target_cap = caps_registry.get(cap_name)
|
||||
|
||||
if target_cap.nil?
|
||||
raise "Failed to locate requested capability `#{cap_name.inspect}' on plugin #{plugin_name}"
|
||||
raise Vagrant::Errors::CapabilityNotFound,
|
||||
cap: cap_name.inspect,
|
||||
host: plugin_name
|
||||
end
|
||||
|
||||
args = mapper.funcspec_map(
|
||||
|
||||
@ -26,8 +26,8 @@ module VagrantPlugins
|
||||
return if !block_given?
|
||||
begin
|
||||
yield info
|
||||
rescue => e
|
||||
raise "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
|
||||
rescue
|
||||
raise
|
||||
ensure
|
||||
Service::ServiceInfo.manager_tracker.deactivate do
|
||||
Vagrant.plugin("2").disable_remote_manager
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user