[Solar-svn] Revision 2894
pmjones at solarphp.com
pmjones at solarphp.com
Thu Oct 18 14:47:10 CDT 2007
Solar_File
* [FIX] Added Solar_File_Exception series, which corrects infinite recursion when autoload() cannot find a file. Thanks to Rodrigo Moraes for alerting me to this bug.
Added: trunk/Solar/File/Exception/NotFound.php
===================================================================
--- trunk/Solar/File/Exception/NotFound.php (rev 0)
+++ trunk/Solar/File/Exception/NotFound.php 2007-10-18 19:47:10 UTC (rev 2894)
@@ -0,0 +1,27 @@
+<?php
+/**
+ *
+ * Exception: file was not found.
+ *
+ * @category Solar
+ *
+ * @package Solar
+ *
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ *
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ *
+ * @version $Id: ConnectionFailed.php 2440 2007-04-21 14:33:44Z pmjones $
+ *
+ */
+
+/**
+ *
+ * Exception: file was not found.
+ *
+ * @category Solar
+ *
+ * @package Solar
+ *
+ */
+class Solar_File_Exception_NotFound extends Solar_File_Exception {}
\ No newline at end of file
Added: trunk/Solar/File/Exception.php
===================================================================
--- trunk/Solar/File/Exception.php (rev 0)
+++ trunk/Solar/File/Exception.php 2007-10-18 19:47:10 UTC (rev 2894)
@@ -0,0 +1,27 @@
+<?php
+/**
+ *
+ * Generic file exception.
+ *
+ * @category Solar
+ *
+ * @package Solar
+ *
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ *
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ *
+ * @version $Id: ConnectionFailed.php 2440 2007-04-21 14:33:44Z pmjones $
+ *
+ */
+
+/**
+ *
+ * Generic file exception.
+ *
+ * @category Solar
+ *
+ * @package Solar
+ *
+ */
+class Solar_File_Exception extends Solar_Exception {}
\ No newline at end of file
Modified: trunk/Solar/File.php
===================================================================
--- trunk/Solar/File.php 2007-10-18 19:36:20 UTC (rev 2893)
+++ trunk/Solar/File.php 2007-10-18 19:47:10 UTC (rev 2894)
@@ -124,7 +124,7 @@
// could not open the file for reading
throw Solar::exception(
'Solar_File',
- 'ERR_FILE_NOT_READABLE',
+ 'ERR_NOT_READABLE',
'File does not exist or is not readable',
array('file' => $file)
);
More information about the Solar-svn
mailing list