Include the bad timestamp string in the error when unable to parse it

Change-Id: I0a79c25baf829f755aa5d251a78e032a12168364
This commit is contained in:
Jackmcbarn 2015-07-09 15:05:12 -04:00 committed by jenkins-bot
parent 1000d322e5
commit f032e847bf

View file

@ -373,7 +373,7 @@ class LanguageLibrary extends LibraryBase {
$utc = new DateTimeZone( 'UTC' );
$dateObject = new DateTime( $date, $utc );
} catch ( Exception $ex ) {
throw new LuaError( "bad argument #2 to 'formatDate' (not a valid timestamp)" );
throw new LuaError( "bad argument #2 to 'formatDate': invalid timestamp '$date'" );
}
# Set output timezone.