[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Base/src/exceptions/ -> exception.php (source)

   1  <?php
   2  /**
   3   * File containing the ezcBaseException class.
   4   *
   5   * @package Base
   6   * @version 1.8
   7   * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
   8   * @license http://ez.no/licenses/new_bsd New BSD License
   9   */
  10  /**
  11   * ezcBaseException is a container from which all other exceptions in the
  12   * components library descent.
  13   *
  14   * @package Base
  15   * @version 1.8
  16   */
  17  abstract class ezcBaseException extends Exception
  18  {
  19      /**
  20       * Original message, before escaping
  21       */
  22      public $originalMessage;
  23  
  24      /**
  25       * Constructs a new ezcBaseException with $message
  26       *
  27       * @param string $message
  28       */
  29      public function __construct( $message )
  30      {
  31          $this->originalMessage = $message;
  32  
  33          if ( php_sapi_name() == 'cli' )
  34          {
  35              parent::__construct( $message );
  36          }
  37          else
  38          {
  39              parent::__construct( htmlspecialchars( $message ) );
  40          }
  41      }
  42  }
  43  ?>


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7