[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [616] trunk/LedgerSMB/User.pm



Revision: 616
          http://svn.sourceforge.net/ledger-smb/?rev=616&view=rev
Author:   einhverfr
Date:     2006-11-14 21:12:00 -0800 (Tue, 14 Nov 2006)

Log Message:
-----------
Adding more psql error detection stuff

Modified Paths:
--------------
    trunk/LedgerSMB/User.pm

Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm	2006-11-15 05:06:11 UTC (rev 615)
+++ trunk/LedgerSMB/User.pm	2006-11-15 05:12:00 UTC (rev 616)
@@ -458,7 +458,10 @@
 	$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);
 	}
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.