Cache_Lite::raiseError PHP Method

raiseError() public method

Trigger error
public raiseError ( string $msg, integer $code )
$msg string error message
$code integer error code
    function raiseError($msg, $code)
    {
        return new Exception($msg);
    }

Usage Example

コード例 #1
0
 /**
  * Create full directory structure, Ripped straight from the Smarty Template engine.
  * Version:     2.3.0
  * Copyright:   2001,2002 ispi of Lincoln, Inc.
  *
  * @param string $dir Full directory.
  * @access private
  */
 function _create_dir_structure($dir)
 {
     if (!@file_exists($dir)) {
         $dir_parts = preg_split('![\\/]+!', $dir, -1, PREG_SPLIT_NO_EMPTY);
         $new_dir = $dir[0] == DIR_SEP ? DIR_SEP : '';
         foreach ($dir_parts as $dir_part) {
             $new_dir .= $dir_part;
             if (!file_exists($new_dir) && !mkdir($new_dir, 0771)) {
                 Cache_Lite::raiseError('Cache_Lite : problem creating directory \\"$dir\\" !', -3);
                 return false;
             }
             $new_dir .= DIR_SEP;
         }
     }
 }
All Usage Examples Of Cache_Lite::raiseError