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

SF.net SVN: ledger-smb:[3578] trunk/LedgerSMB/Template.pm



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

Log Message:
-----------
Replace another 'eval/if($@)' construct with try/catch.

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

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2011-07-27 07:45:06 UTC (rev 3577)
+++ trunk/LedgerSMB/Template.pm	2011-07-27 07:56:22 UTC (rev 3578)
@@ -247,10 +247,12 @@
 #	if ($self->{myconfig}){
 #	        $self->_preprocess($vars);
 #	}
-	eval "require $format";
-	if ($@) {
-		throw Error::Simple $@;
+	try { require $format; }
+	catch CancelFurtherProcessing with {
+	    my $ex = shift;
+	    throw $ex;
 	}
+	otherwise { throw Error::Simple $@ };
 
 	my $cleanvars;
 	if ($self->{no_escape}) {


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