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

SF.net SVN: ledger-smb:[5909] trunk/LedgerSMB/PGDate.pm



Revision: 5909
          http://sourceforge.net/p/ledger-smb/code/5909
Author:   einhverfr
Date:     2013-07-21 09:24:51 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
Better error handling for invalid dates, moving from croak to die for now due to clarity

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

Modified: trunk/LedgerSMB/PGDate.pm
===================================================================
--- trunk/LedgerSMB/PGDate.pm	2013-07-21 09:24:06 UTC (rev 5908)
+++ trunk/LedgerSMB/PGDate.pm	2013-07-21 09:24:51 UTC (rev 5909)
@@ -150,7 +150,7 @@
     return undef if !defined $input;
     my $format = $LedgerSMB::App_State::User->{dateformat};
     my $dt =  _parse_string($self, $input, uc($format), $has_time);
-    croak $LedgerSMB::App_State::Locale->text("Invalid date/date: [_1]", $input)
+    die $LedgerSMB::App_State::Locale->text("Invalid date/date: [_1]", $input)
         unless $dt;
     return $self->new({date => $dt});
 }

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