summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-15 05:12:00 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-15 05:12:00 +0000
commite8c27acc29a1b899e24526c7962091face6b66e4 (patch)
tree6e3407047967ead95ed1a318b217da810bb5499b
parent7cb3213ba1a2f90b5c025c716092ede5038c6ca8 (diff)
Adding more psql error detection stuff
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@616 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/User.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index ee870d7c..5e06a2e0 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -458,7 +458,10 @@ sub process_query {
$ENV{PGDATABASE} = $form->{db};
$results = `psql -f $filename 2>&1`;
- if ($? or ($results =~ /error/i)){
+ if ($?){
+ $form->error($!);
+ }
+ elsif ($results =~ /error/i){
$form->error($results);
}
}