lib/veewee/provider/virtualbox/box/destroy.rb in veewee-0.3.0.alpha8 vs lib/veewee/provider/virtualbox/box/destroy.rb in veewee-0.3.0.alpha9

- old
+ new

@@ -4,12 +4,11 @@ module BoxCommand def destroy(option={}) unless self.exists? - ui.error "Error:: You tried to destroy a non-existing box '#{name}'" - exit -1 + raise Veewee::Error, "Error:: You tried to destroy a non-existing box '#{name}'" end # If it has a save state,remove that first if self.running? @@ -51,10 +50,9 @@ if File.exists?(location) ui.info "We tried to delete the disk file via virtualbox '#{location} but failed" ui.info "Removing it manually" FileUtils.rm(location) - exit -1 end break end end end