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

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



Revision: 6628
          http://sourceforge.net/p/ledger-smb/code/6628
Author:   einhverfr
Date:     2014-01-25 06:32:49 +0000 (Sat, 25 Jan 2014)
Log Message:
-----------
Moving all template format handlers to new error handling

Modified Paths:
--------------
    trunk/LedgerSMB/Template/CSV.pm
    trunk/LedgerSMB/Template/HTML.pm
    trunk/LedgerSMB/Template/LaTeX.pm
    trunk/LedgerSMB/Template/ODS.pm
    trunk/LedgerSMB/Template/TXT.pm

Modified: trunk/LedgerSMB/Template/CSV.pm
===================================================================
--- trunk/LedgerSMB/Template/CSV.pm	2014-01-25 06:29:58 UTC (rev 6627)
+++ trunk/LedgerSMB/Template/CSV.pm	2014-01-25 06:32:49 UTC (rev 6628)
@@ -45,7 +45,6 @@
 use warnings;
 use strict;
 
-use Error qw(:try);
 use Template;
 use LedgerSMB::Template::TTI18N;
 use LedgerSMB::Template::DB;
@@ -130,14 +129,14 @@
 		DELIMITER => ';',
 		DEBUG => ($parent->{debug})? 'dirs': undef,
 		DEBUG_FORMAT => '',
-		}) || throw Error::Simple Template->error(); 
+		}) || die Template->error(); 
 
 	if (not $template->process(
 		$source, 
 		{%$cleanvars, %$LedgerSMB::Template::TTI18N::ttfuncs,
 			'escape' => \&preprocess},
 		$output, binmode => ':utf8')) {
-		throw Error::Simple $template->error();
+		die $template->error();
 	}
 	$parent->{mimetype} = 'text/csv';
 }

Modified: trunk/LedgerSMB/Template/HTML.pm
===================================================================
--- trunk/LedgerSMB/Template/HTML.pm	2014-01-25 06:29:58 UTC (rev 6627)
+++ trunk/LedgerSMB/Template/HTML.pm	2014-01-25 06:32:49 UTC (rev 6628)
@@ -46,7 +46,6 @@
 use warnings;
 use strict;
 
-use Error qw(:try);
 use CGI::Simple::Standard qw(:html);
 use Template;
 use LedgerSMB::Template::TTI18N;
@@ -161,13 +160,13 @@
        
 	$template = Template->new(
                     $arghash
-		) || throw Error::Simple Template->error(); 
+		) || die Template->error(); 
 	if (not $template->process(
 		$source, 
 		{%$cleanvars, %$LedgerSMB::Template::TTI18N::ttfuncs,
 			'escape' => \&preprocess},
 		$output, {binmode => ':utf8'})) {
-		throw Error::Simple $template->error();
+		die $template->error();
 	}
 	$parent->{mimetype} = 'text/html';
 }

Modified: trunk/LedgerSMB/Template/LaTeX.pm
===================================================================
--- trunk/LedgerSMB/Template/LaTeX.pm	2014-01-25 06:29:58 UTC (rev 6627)
+++ trunk/LedgerSMB/Template/LaTeX.pm	2014-01-25 06:32:49 UTC (rev 6628)
@@ -54,7 +54,6 @@
 use warnings;
 use strict;
 
-use Error qw(:try);
 use Template::Latex;
 use LedgerSMB::Template::TTI18N;
 use Log::Log4perl;
@@ -163,7 +162,7 @@
                 ENCODING => 'utf8',
 		DEBUG => ($parent->{debug})? 'dirs': undef,
 		DEBUG_FORMAT => '',
-		}) || throw Error::Simple Template::Latex->error(); 
+		}) || die Template::Latex->error(); 
 	if (not $template->process(
 		$source, 
 		{%$cleanvars, %$LedgerSMB::Template::TTI18N::ttfuncs,

Modified: trunk/LedgerSMB/Template/ODS.pm
===================================================================
--- trunk/LedgerSMB/Template/ODS.pm	2014-01-25 06:29:58 UTC (rev 6627)
+++ trunk/LedgerSMB/Template/ODS.pm	2014-01-25 06:32:49 UTC (rev 6628)
@@ -47,7 +47,6 @@
 use strict;
 use warnings;
 
-use Error qw(:try);
 use Data::Dumper;
 use CGI::Simple::Standard qw(:html);
 use Template;
@@ -866,14 +865,14 @@
 		DELIMITER => ';',
 		DEBUG => ($parent->{debug})? 'dirs': undef,
 		DEBUG_FORMAT => '',
-		}) || throw Error::Simple Template->error(); 
+		}) || die Template->error(); 
 
 	if (not $template->process(
 		$source, 
 		{%$cleanvars, %$LedgerSMB::Template::TTI18N::ttfuncs,
 			'escape' => \&preprocess},
 		\$output, binmode => ':utf8')) {
-		throw Error::Simple $template->error();
+		die $template->error();
 	}
 	&_ods_process("$parent->{outputfile}.ods", $output);
 

Modified: trunk/LedgerSMB/Template/TXT.pm
===================================================================
--- trunk/LedgerSMB/Template/TXT.pm	2014-01-25 06:29:58 UTC (rev 6627)
+++ trunk/LedgerSMB/Template/TXT.pm	2014-01-25 06:32:49 UTC (rev 6628)
@@ -44,7 +44,6 @@
 use warnings;
 use strict;
 
-use Error qw(:try);
 use Template;
 use LedgerSMB::Template::TTI18N;
 use DateTime;
@@ -138,7 +137,7 @@
 		DELIMITER => ';',
 		DEBUG => ($parent->{debug})? 'dirs': undef,
 		DEBUG_FORMAT => '',
-		}) || throw Error::Simple Template->error(); 
+		}) || die Template->error(); 
 
 	if (not $template->process(
 		$source, 

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


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits