diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-01-17 12:01:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-01-17 12:01:01 +0000 |
commit | 38e4108497b4b5487447c1c6a644a8a74ef16629 (patch) | |
tree | df5a976ef3b3483c22a95b7e37daf53ecf9d769b /usr.sbin/pkg_add/OpenBSD | |
parent | 89f002be301e5f901ee9328045b8432a2afd826d (diff) |
even better messages
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/RequiredBy.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm b/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm index e758eb155f7..337cd34d8ce 100644 --- a/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm +++ b/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: RequiredBy.pm,v 1.19 2010/01/17 11:56:46 espie Exp $ +# $OpenBSD: RequiredBy.pm,v 1.20 2010/01/17 12:01:00 espie Exp $ # # Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org> # @@ -30,8 +30,8 @@ sub fill_entries if (-f $self->{filename}) { open(my $fh, '<', $self->{filename}) or - croak "Problem opening required list: ", - $self->{filename}, ": $!"; + croak ref($self), + ": reading $self->{filename}: $!"; my $_; while(<$fh>) { s/\s+$//o; @@ -54,17 +54,17 @@ sub synch if (!unlink $self->{filename}) { if ($self->{nonempty}) { - croak "Can't erase $self->{filename}: $!"; + croak ref($self), ": erasing $self->{filename}: $!"; } } if (%{$self->{entries}}) { open(my $fh, '>', $self->{filename}) or - croak "Can't write $self->{filename}: $!"; + croak ref($self), ": writing $self->{filename}: $!"; while (my ($k, $v) = each %{$self->{entries}}) { print $fh "$k\n"; } close($fh) or - croak "Write to $self->{filename} didn't work: $!"; + croak ref($self), ": closing $self->{filename}: $!"; $self->{nonempty} = 1; } else { $self->{nonempty} = 0; |