diff options
author | Russ Allbery <rra@stanford.edu> | 2007-08-30 17:52:49 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-08-30 17:52:49 +0000 |
commit | 100779a7b7f71749b10fe078b8f38307319ef88f (patch) | |
tree | d17684239bca7f167ccf78785eb3d6289d84a59f /perl/Wallet/ACL.pm | |
parent | 0ec04f853bd1a436b33ddad0feac10e61c791f39 (diff) |
Properly clean up errors from exceptions. Properly catch exceptions when
creating ACL objects in Wallet::Server. Don't return the ACL object from
the acl_create method of Wallet::Server -- it's a layering violation.
Diffstat (limited to 'perl/Wallet/ACL.pm')
-rw-r--r-- | perl/Wallet/ACL.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl/Wallet/ACL.pm b/perl/Wallet/ACL.pm index 6226585..63e76aa 100644 --- a/perl/Wallet/ACL.pm +++ b/perl/Wallet/ACL.pm @@ -159,7 +159,7 @@ sub rename { if ($@) { $self->{error} = "cannot rename ACL $self->{id} to $name: $@"; chomp $self->{error}; - $self->{error} =~ / at .*$/; + $self->{error} =~ s/ at .*$//; $self->{dbh}->rollback; return undef; } @@ -185,7 +185,7 @@ sub destroy { if ($@) { $self->{error} = "cannot destroy ACL $self->{id}: $@"; chomp $self->{error}; - $self->{error} =~ / at .*$/; + $self->{error} =~ s/ at .*$//; $self->{dbh}->rollback; return undef; } @@ -214,7 +214,7 @@ sub add { if ($@) { $self->{error} = "cannot add $scheme:$identifier to $self->{id}: $@"; chomp $self->{error}; - $self->{error} =~ / at .*$/; + $self->{error} =~ s/ at .*$//; $self->{dbh}->rollback; return undef; } @@ -245,7 +245,7 @@ sub remove { my $entry = "$scheme:$identifier"; $self->{error} = "cannot remove $entry from $self->{id}: $@"; chomp $self->{error}; - $self->{error} =~ / at .*$/; + $self->{error} =~ s/ at .*$//; $self->{dbh}->rollback; return undef; } @@ -275,7 +275,7 @@ sub list { if ($@) { $self->{error} = "cannot retrieve ACL $self->{id}: $@"; chomp $self->{error}; - $self->{error} =~ / at .*$/; + $self->{error} =~ s/ at .*$//; return (undef); } else { return @entries; |