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

SF.net SVN: ledger-smb:[3576] trunk/scripts/payment.pl



Revision: 3576
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3576&view=rev
Author:   ehuelsmann
Date:     2011-07-27 07:25:11 +0000 (Wed, 27 Jul 2011)

Log Message:
-----------
Eliminate error displayed at the bottom of the payment entry screen.

Modified Paths:
--------------
    trunk/scripts/payment.pl

Modified: trunk/scripts/payment.pl
===================================================================
--- trunk/scripts/payment.pl	2011-07-26 22:35:59 UTC (rev 3575)
+++ trunk/scripts/payment.pl	2011-07-27 07:25:11 UTC (rev 3576)
@@ -51,7 +51,9 @@
 use LedgerSMB::Sysconfig;
 use LedgerSMB::DBObject::Payment;
 use LedgerSMB::DBObject::Date;
+use LedgerSMB::CancelFurtherProcessing;
 use Error::Simple;
+use Error;
 use strict; 
 
 # CT:  A few notes for future refactoring of this code:
@@ -1017,9 +1019,17 @@
   path     => 'UI/payments',
   template => 'payment2',
   format => 'HTML' );
-eval {$template->render($select) };
- if ($@) { $request->error("$@");  } # PRINT ERRORS ON THE UI
+try {
+   $template->render($select);
 }
+catch CancelFurtherProcessing with {
+  my $ex = shift;
+  throw $ex;
+}
+otherwise {
+    $request->error("$@");
+  }; # PRINT ERRORS ON THE UI
+}
 
 =pod
 


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