original_string: function setErrorHandling($mode = null, $options = null)
      {
          if (isset($this) && is_a($this, 'PEAR')) {
              $setmode     = &$this->_default_error_mode;
              $setoptions  = &$this->_default_error_options;
          } else {
              $setmode     = &$GLOBALS['_PEAR_default_error_mode'];
              $setoptions  = &$GLOBALS['_PEAR_default_error_options'];
          }
  
          switch ($mode) {
              case PEAR_ERROR_EXCEPTION:
              case PEAR_ERROR_RETURN:
              case PEAR_ERROR_PRINT:
              case PEAR_ERROR_TRIGGER:
              case PEAR_ERROR_DIE:
              case null:
                  $setmode = $mode;
                  $setoptions = $options;
                  break;
  
              case PEAR_ERROR_CALLBACK:
                  $setmode = $mode;
                  // class/object method callback
                  if (is_callable($options)) {
                      $setoptions = $options;
                  } else {
                      trigger_error("invalid error callback", E_USER_WARNING);
                  }
                  break;
  
              default:
                  trigger_error("invalid error mode", E_USER_WARNING);
                  break;
          }
      }
code: function setErrorHandling($mode = null, $options = null)
      {
          if (isset($this) && is_a($this, 'PEAR')) {
              $setmode     = &$this->_default_error_mode;
              $setoptions  = &$this->_default_error_options;
          } else {
              $setmode     = &$GLOBALS['_PEAR_default_error_mode'];
              $setoptions  = &$GLOBALS['_PEAR_default_error_options'];
          }
  
          switch ($mode) {
              case PEAR_ERROR_EXCEPTION:
              case PEAR_ERROR_RETURN:
              case PEAR_ERROR_PRINT:
              case PEAR_ERROR_TRIGGER:
              case PEAR_ERROR_DIE:
              case null:
                  $setmode = $mode;
                  $setoptions = $options;
                  break;
  
              case PEAR_ERROR_CALLBACK:
                  $setmode = $mode;
                  // class/object method callback
                  if (is_callable($options)) {
                      $setoptions = $options;
                  } else {
                      trigger_error("invalid error callback", E_USER_WARNING);
                  }
                  break;
  
              default:
                  trigger_error("invalid error mode", E_USER_WARNING);
                  break;
          }
      }
code_tokens: function setErrorHandling ( $ mode = null , $ options = null ) { if ( isset ( $ this ) && is_a ( $ this , 'PEAR' ) ) { $ setmode = & $ this -> _default_error_mode ; $ setoptions = & $ this -> _default_error_options ; } else { $ setmode = & $ GLOBALS [ '_PEAR_default_error_mode' ] ; $ setoptions = & $ GLOBALS [ '_PEAR_default_error_options' ] ; } switch ( $ mode ) { case PEAR_ERROR_EXCEPTION : case PEAR_ERROR_RETURN : case PEAR_ERROR_PRINT : case PEAR_ERROR_TRIGGER : case PEAR_ERROR_DIE : case null : $ setmode = $ mode ; $ setoptions = $ options ; break ; case PEAR_ERROR_CALLBACK : $ setmode = $ mode ; // class/object method callback if ( is_callable ( $ options ) ) { $ setoptions = $ options ; } else { trigger_error ( "invalid error callback" , E_USER_WARNING ) ; } break ; default : trigger_error ( "invalid error mode" , E_USER_WARNING ) ; break ; } }
docstring: Sets how errors generated by this object should be handled.
  Can be invoked both in objects and statically.  If called
  statically, setErrorHandling sets the default behaviour for all
  PEAR objects.  If called in an object, setErrorHandling sets
  the default behaviour for that object.
  
  @param int $mode
  One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
  PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
  PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION.
  
  @param mixed $options
  When $mode is PEAR_ERROR_TRIGGER, this is the error level (one
  of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
  
  When $mode is PEAR_ERROR_CALLBACK, this parameter is expected
  to be the callback function or method.  A callback
  function is a string with the name of the function, a
  callback method is an array of two elements: the element
  at index 0 is the object, and the element at index 1 is
  the name of the method to call in the object.
  
  When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is
  a printf format string used when printing the error
  message.
  
  @access public
  @return void
  @see PEAR_ERROR_RETURN
  @see PEAR_ERROR_PRINT
  @see PEAR_ERROR_TRIGGER
  @see PEAR_ERROR_DIE
  @see PEAR_ERROR_CALLBACK
  @see PEAR_ERROR_EXCEPTION
  
  @since PHP 4.0.5
docstring_tokens: Sets how errors generated by this object should be handled . Can be invoked both in objects and statically . If called statically setErrorHandling sets the default behaviour for all PEAR objects . If called in an object setErrorHandling sets the default behaviour for that object .