summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Update.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-12-12 11:26:17 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-12-12 11:26:17 +0000
commit79db8ddbe476270aefaa8b2998affdbdb4832410 (patch)
treed042160fad019954af030a71ba763f490b8dc6c6 /usr.sbin/pkg_add/OpenBSD/Update.pm
parent113f55f3830775e56b5a626476cf9c4e606cd57b (diff)
add somewhat more regular error catching code.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Update.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index c4e6e6cca73..802956e522f 100644
--- a/usr.sbin/pkg_add/OpenBSD/Update.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Update.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Update.pm,v 1.38 2004/12/02 00:19:26 espie Exp $
+# $OpenBSD: Update.pm,v 1.39 2004/12/12 11:26:16 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -259,13 +259,12 @@ sub can_do
}
if ($state->{okay}) {
- eval {
+ try {
OpenBSD::Delete::validate_plist($plist, $state);
- };
- if ($@) {
- Warn "$@";
+ } catchall {
+ Warn "$_";
return 0;
- }
+ };
}
$plist->{wantlist} = \@wantlist;