Changeset 412
- Timestamp:
- 03/22/07 17:57:18 (1 year ago)
- Files:
-
- trunk/docroot/error.php (added)
- trunk/src/main/php/net/stubbles/util/errorhandler/stubCompositeErrorHandler.php (modified) (4 diffs)
- trunk/src/main/php/net/stubbles/util/errorhandler/stubErrorHandler.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/util/errorhandler/stubIllegalArgumentErrorHandler.php (added)
- trunk/src/main/php/net/stubbles/util/exceptions (added)
- trunk/src/main/php/net/stubbles/util/exceptions/stubIllegalArgumentException.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/util/errorhandler/stubCompositeErrorHandler.php
r411 r412 12 12 * @package stubbles 13 13 * @subpackage util_errorhandler 14 * @see http://php.net/set_error_handler 14 15 */ 15 16 class stubCompositeErrorHandler extends stubBaseObject implements stubErrorHandler … … 21 22 */ 22 23 protected $errorHandlers = array(); 23 24 /** 25 * registers this class as the new PHP error handler 26 */ 27 public function register() 28 { 29 set_error_handler(array($this, 'handle')); 30 } 31 24 32 25 /** 33 26 * adds an error handler to the collection … … 83 76 84 77 /** 85 * checks whether this error handler is responsible forthe given error78 * handles the given error 86 79 * 87 80 * @param int $level level of the raised error … … 91 84 * @param array $context optional array of every variable that existed in the scope the error was triggered in 92 85 * @return bool true if error message should populate $php_errormsg, else false 86 * @throws stubException error handlers are allowed to throw every exception they want to 93 87 */ 94 88 public function handle($level, $message, $file = null, $line = null, array $context = array()) trunk/src/main/php/net/stubbles/util/errorhandler/stubErrorHandler.php
r411 r412 10 10 * Interface for PHP error handlers. 11 11 * 12 * @static13 12 * @package stubbles 14 13 * @subpackage util_errorhandler 14 * @see http://php.net/set_error_handler 15 15 */ 16 16 interface stubErrorHandler … … 44 44 45 45 /** 46 * checks whether this error handler is responsible forthe given error46 * handles the given error 47 47 * 48 48 * @param int $level level of the raised error … … 52 52 * @param array $context optional array of every variable that existed in the scope the error was triggered in 53 53 * @return bool true if error message should populate $php_errormsg, else false 54 * @throws stubException error handlers are allowed to throw every exception they want to 54 55 */ 55 56 public function handle($level, $message, $file = null, $line = null, array $context = array());
