[freeside-commits] freeside/FS/FS/L10N DBI.pm,1.1,1.2
Erik Levinson
levinse at wavetail.420.am
Wed Jun 15 21:25:36 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/L10N
In directory wavetail.420.am:/tmp/cvs-serv32232/FS/FS/L10N
Modified Files:
DBI.pm
Log Message:
L10N/DBI.pm: handle maketext exceptions properly, RT13258
Index: DBI.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/L10N/DBI.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- DBI.pm 12 May 2011 23:31:35 -0000 1.1
+++ DBI.pm 16 Jun 2011 04:25:34 -0000 1.2
@@ -14,8 +14,14 @@
$Lexicon{$key} = FS::Msgcat::_gettext( $key, $lang );
}
- $lh->SUPER::maketext($key, @rest);
+ my $res = eval { $lh->SUPER::maketext($key, @rest) };
+ if ( !$res || $@ ) {
+ my $errmsg = "MT error for '$key'";
+ warn "$errmsg\n";
+ return $errmsg;
+ }
+ $res;
}
1;
More information about the freeside-commits
mailing list