[limb-svn] r5539 - 3.x/trunk/limb/datetime/src

svn at limb-project.com svn at limb-project.com
Thu Apr 5 16:49:05 MSD 2007


Author: pachanga
Date: 2007-04-05 16:49:05 +0400 (Thu, 05 Apr 2007)
New Revision: 5539
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5539

Modified:
   3.x/trunk/limb/datetime/src/lmbDate.class.php
Log:
-- better exception messages

Modified: 3.x/trunk/limb/datetime/src/lmbDate.class.php
===================================================================
--- 3.x/trunk/limb/datetime/src/lmbDate.class.php	2007-04-05 12:48:29 UTC (rev 5538)
+++ 3.x/trunk/limb/datetime/src/lmbDate.class.php	2007-04-05 12:49:05 UTC (rev 5539)
@@ -1,13 +1,13 @@
 <?php
-/**
- * Limb Web Application Framework
- *
- * @link http://limb-project.com
- *
- * @copyright  Copyright &copy; 2004-2007 BIT
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html
- * @version    $Id$
- * @package    datetime
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id$
+ * @package    datetime
  */
 lmb_require('limb/classkit/src/lmbObject.class.php');
 
@@ -60,7 +60,7 @@
     if(!$this->isValid())
     {
       $args = func_get_args();
-      throw new lmbException('could not create date', array($args));
+      throw new lmbException("Could not create date using args '$args'");
     }
   }
 
@@ -100,7 +100,7 @@
   protected function _setByString($string)
   {
     if(!preg_match(self :: DATE_STRING_REGEX, trim($string), $regs))
-      throw new lmbException('could not setup date using string', array('string' => $string));
+      throw new lmbException("Could not setup date using string '$string'");
 
     if(isset($regs[1]))
     {
@@ -121,7 +121,7 @@
   protected function _setByStamp($time)
   {
     if($time < 0 || !$arr = @getdate($time))
-      throw new lmbException('could not setup date using stamp', array('stamp' => $time));
+      throw new lmbException("Could not setup date using stamp'$time'");
 
     $this->year   = $arr['year'];
     $this->month  = $arr['mon'];



More information about the limb-svn mailing list