[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5908] trunk
- Subject: SF.net SVN: ledger-smb:[5908] trunk
- From: ..hidden..
- Date: Sun, 21 Jul 2013 09:24:06 +0000
Revision: 5908
http://sourceforge.net/p/ledger-smb/code/5908
Author: einhverfr
Date: 2013-07-21 09:24:06 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
Better error handling for invalid dates
Modified Paths:
--------------
trunk/LedgerSMB/PGDate.pm
Added Paths:
-----------
trunk/LedgerSMB/Scripts/document_series.pm
trunk/document_series.pl
Modified: trunk/LedgerSMB/PGDate.pm
===================================================================
--- trunk/LedgerSMB/PGDate.pm 2013-07-19 20:47:54 UTC (rev 5907)
+++ trunk/LedgerSMB/PGDate.pm 2013-07-21 09:24:06 UTC (rev 5908)
@@ -6,6 +6,7 @@
package LedgerSMB::PGDate;
use Moose;
use DateTime::Format::Strptime;
+use LedgerSMB::App_State;
use Carp;
use DateTime::Duration;
@@ -149,6 +150,8 @@
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)
+ unless $dt;
return $self->new({date => $dt});
}
Added: trunk/LedgerSMB/Scripts/document_series.pm
===================================================================
Copied: trunk/document_series.pl (from rev 5878, trunk/configuration.pl)
===================================================================
--- trunk/document_series.pl (rev 0)
+++ trunk/document_series.pl 2013-07-21 09:24:06 UTC (rev 5908)
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+use FindBin;
+BEGIN {
+ lib->import($FindBin::Bin) unless $ENV{mod_perl}
+}
+require "lsmb-request.pl";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.