diff options
author | 2004-10-04 12:12:30 +0000 | |
---|---|---|
committer | 2004-10-04 12:12:30 +0000 | |
commit | eac6796c38aad9d544d11efc0693c514689a1fbf (patch) | |
tree | 87343af8b522cf225b77bd999b1bc8756613b5f4 | |
parent | fix bogus indentation (diff) | |
download | wireguard-openbsd-eac6796c38aad9d544d11efc0693c514689a1fbf.tar.xz wireguard-openbsd-eac6796c38aad9d544d11efc0693c514689a1fbf.zip |
Add Fatal/Warn routines: for now, they do nothing more than die/print STDERR,
but they can get better.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Error.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Error.pm b/usr.sbin/pkg_add/OpenBSD/Error.pm index eb0f6df4889..227e56f1317 100644 --- a/usr.sbin/pkg_add/OpenBSD/Error.pm +++ b/usr.sbin/pkg_add/OpenBSD/Error.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Error.pm,v 1.1 2004/09/14 22:43:09 espie Exp $ +# $OpenBSD: Error.pm,v 1.2 2004/10/04 12:12:30 espie Exp $ # # Copyright (c) 2004 Marc Espie <espie@openbsd.org> # @@ -20,7 +20,7 @@ use warnings; package OpenBSD::Error; our @ISA=qw(Exporter); -our @EXPORT=qw(System VSystem Copy); +our @EXPORT=qw(System VSystem Copy Fatal Warn); sub System { @@ -58,4 +58,14 @@ sub Copy return $r; } +sub Fatal +{ + die @_; +} + +sub Warn +{ + print STDERR @_; +} + 1; |