Changeset 412

Show
Ignore:
Timestamp:
03/22/07 17:57:18 (1 year ago)
Author:
mikey
Message:

added net.stubbles.util.errorhandler.stubIllegalArgumentErrorHandler
added net.stubbles.util.exceptions.stubIllegalArgumentException

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/util/errorhandler/stubCompositeErrorHandler.php

    r411 r412  
    1212 * @package     stubbles 
    1313 * @subpackage  util_errorhandler 
     14 * @see         http://php.net/set_error_handler 
    1415 */ 
    1516class stubCompositeErrorHandler extends stubBaseObject implements stubErrorHandler 
     
    2122     */ 
    2223    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 
    3225    /** 
    3326     * adds an error handler to the collection 
     
    8376     
    8477    /** 
    85      * checks whether this error handler is responsible for the given error 
     78     * handles the given error 
    8679     * 
    8780     * @param   int     $level    level of the raised error 
     
    9184     * @param   array   $context  optional  array of every variable that existed in the scope the error was triggered in 
    9285     * @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 
    9387     */ 
    9488    public function handle($level, $message, $file = null, $line = null, array $context = array()) 
  • trunk/src/main/php/net/stubbles/util/errorhandler/stubErrorHandler.php

    r411 r412  
    1010 * Interface for PHP error handlers. 
    1111 *  
    12  * @static 
    1312 * @package     stubbles 
    1413 * @subpackage  util_errorhandler 
     14 * @see         http://php.net/set_error_handler 
    1515 */ 
    1616interface stubErrorHandler 
     
    4444     
    4545    /** 
    46      * checks whether this error handler is responsible for the given error 
     46     * handles the given error 
    4747     * 
    4848     * @param   int     $level    level of the raised error 
     
    5252     * @param   array   $context  optional  array of every variable that existed in the scope the error was triggered in 
    5353     * @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 
    5455     */ 
    5556    public function handle($level, $message, $file = null, $line = null, array $context = array());