芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp70/includes/Tree/Error.php
| // +----------------------------------------------------------------------+ // // $Id: Error.php,v 1.8.2.3 2009/03/12 17:19:52 dufuz Exp $ require_once 'PEAR.php'; /** * Errors constants definitions */ define('TREE_ERROR_NOT_IMPLEMENTED', -1); define('TREE_ERROR_ELEMENT_NOT_FOUND', -2); define('TREE_ERROR_INVALID_NODE_NAME', -3); define('TREE_ERROR_MOVE_TO_CHILDREN', -4); define('TREE_ERROR_PARENT_ID_MISSED', -5); define('TREE_ERROR_INVALID_PARENT', -6); define('TREE_ERROR_EMPTY_PATH', -7); define('TREE_ERROR_INVALID_PATH', -8); define('TREE_ERROR_DB_ERROR', -9); define('TREE_ERROR_PATH_SEPARATOR_EMPTY',-10); define('TREE_ERROR_CANNOT_CREATE_FOLDER',-11); define('TREE_ERROR_UNKNOW_ERROR', -99); /** * * * @author Wolfram Kriesing
* @package Tree */ class Tree_Error extends PEAR_Error { /** * @var string prefix for error messages. */ var $error_message_prefix = "Tree Error: "; // {{{ Tree_Error() /** * @access public * @version 2002/03/03 * @author Wolfram Kriesing
*/ function Tree_Error($msg, $line, $file, $mode = null, $userinfo = 'no userinfo') { $this->PEAR_Error(sprintf("%s
in %s [%d].", $msg, $file, $line), null , $mode , null, $userinfo ); } // }}} // {{{ getMessage() function getMessage($id) { $messages = array( TREE_ERROR_NOT_IMPLEMENTED => '', TREE_ERROR_INVALID_PATH => '', TREE_ERROR_DB_ERROR => '', TREE_ERROR_PARENT_ID_MISSED => '', TREE_ERROR_MOVE_TO_CHILDREN => '', TREE_ERROR_ELEMENT_NOT_FOUND => '', TREE_ERROR_PATH_SEPARATOR_EMPTY => '', TREE_ERROR_INVALID_NODE_NAME => '', TREE_ERROR_UNKNOW_ERROR => '' ); return isset($messages[$id])?$messages[$id]: $messages[TREE_ERROR_UNKNOW_ERROR]; } // }}} }