Console_Application
[ class tree: Console_Application ] [ index: Console_Application ] [ all elements ]

Source for file Exception.php

Documentation is available at Exception.php

  1. <?php
  2. /**
  3.  * Console Library
  4.  *
  5.  * LICENSE
  6.  *
  7.  * "THE BEER-WARE LICENSE" (Revision 42):
  8.  * "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
  9.  * As long as you retain this notice you can do whatever you want with
  10.  * this stuff. If we meet some day, and you think this stuff is worth it,
  11.  * you can buy me a beer in return.
  12.  *
  13.  * $Author: sxs $
  14.  * $Revision: 161 $
  15.  *
  16.  * @category    Console
  17.  * @package     Console_Application
  18.  * @copyright   Copyright (c) 2009 Sven Strittmatter
  19.  */
  20.  
  21. /**
  22.  * Main exception calss.
  23.  *
  24.  * @category   Console
  25.  * @package    Console_Application
  26.  * @uses       Exception
  27.  * @copyright  Copyright (c) 2009 Sven Strittmatter
  28.  */
  29. class Console_Exception extends Exception {
  30.     public function __construct ($message$code 0{
  31.         $code = (int) $code;
  32.         parent::__construct($message$code);
  33.     }
  34.  
  35.     /**
  36.      * Formats the excpetion so we can echo it direct to the CLI.
  37.      *
  38.      * @access public
  39.      */
  40.     public function __toString({
  41.         return 'Excpetion: ' $this->getMessage(.
  42.                ' [Code: ' $this->getCode(']' PHP_EOL;
  43.     }
  44. }

Documentation generated on Mon, 17 Aug 2009 15:52:35 +0200 by phpDocumentor 1.4.2