Orion PHP  0.11.12
The PHP5.3 framework
exception.php
Go to the documentation of this file.
00001 <?php
00002 
00003 namespace Orion\Core\Security;
00004 
00005 class Exception extends \Orion\Core\Exception
00006 {
00007 
00008     /**
00009      * Generates a Query Exception
00010      * @param string $message
00011      * @param int $code
00012      * @param string $caller Caller class' name
00013      */
00014     public function __construct( $message='An exception occured', $code=1, $forceExit=false )
00015     {
00016         if( $forceExit )
00017         {
00018             die( 'Security : ' . \Orion\Core\Security::preventInjection( $message ) );
00019             exit(1);
00020         }
00021         parent::__construct( ( string ) $message, $code, 'Security' );
00022         
00023     }
00024 
00025 }
00026 
00027 ?>