diff options
author | Richard Jones <rjones@redhat.com> | 2010-03-26 17:14:04 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-03-30 16:25:12 +0100 |
commit | 4b48f93ce6407923ea23451cfe39ac63811d1f42 (patch) | |
tree | dd3fc8f971ee012541d1373ebc3407237f2c324d /perl/lib/Sys/Guestfs | |
parent | 29c78cc979297b95407a5956b4caa34240a2f5a8 (diff) | |
download | libguestfs-4b48f93ce6407923ea23451cfe39ac63811d1f42.tar.gz libguestfs-4b48f93ce6407923ea23451cfe39ac63811d1f42.tar.xz libguestfs-4b48f93ce6407923ea23451cfe39ac63811d1f42.zip |
Improved version of virt-win-reg, supporting exporting and merging.
Diffstat (limited to 'perl/lib/Sys/Guestfs')
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index ade4a6fe..9dbce2cd 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -20,6 +20,8 @@ package Sys::Guestfs::Lib; use strict; use warnings; +use Carp qw(croak); + use Sys::Guestfs; use File::Temp qw/tempdir/; use Locale::TextDomain 'libguestfs'; @@ -140,14 +142,14 @@ sub open_guest } elsif (ref ($first) eq "SCALAR") { @images = ($first); } else { - die __"open_guest: first parameter must be a string or an arrayref" + croak __"open_guest: first parameter must be a string or an arrayref" } my ($conn, $dom); if (-e $images[0]) { foreach (@images) { - die __x("guest image {imagename} does not exist or is not readable", + croak __x("guest image {imagename} does not exist or is not readable", imagename => $_) unless -r $_; } |