Revision 1aaf04e4 src/vmm_mad/remotes/vcenter/snapshot_delete

View differences:

src/vmm_mad/remotes/vcenter/snapshot_delete
44 44
    vm.delete_snapshot(snap_id)
45 45

  
46 46
rescue Exception => e
47
    STDERR.puts "Snapshot of VM #{vm_ref} on vCenter cluster "\
48
                "#{vc_cluster_name} could not be deleted due to "\
49
                "\"#{e.message}\"\n#{e.backtrace}"
50
    exit(-1)
47
    message = "Snapshot of VM #{vm_ref} on vCenter cluster "\
48
              "#{vc_cluster_name} could not be deleted due to "\
49
              "\"#{e.message}\"\n#{e.backtrace}"
50
    STDERR.puts error_message(message)
51
    exit -1
51 52
ensure
52 53
    vi_client.close_connection if vi_client
53 54
end

Also available in: Unified diff