fix: 上传TP框架

This commit is contained in:
2017-10-20 14:00:22 +08:00
parent 3e7cf7c0aa
commit 6168d27257
167 changed files with 38754 additions and 1 deletions

View File

@ -0,0 +1,43 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2017 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn>
// +----------------------------------------------------------------------
namespace think\exception;
use think\Exception;
/**
* Database相关异常处理类
*/
class DbException extends Exception
{
/**
* DbException constructor.
* @param string $message
* @param array $config
* @param string $sql
* @param int $code
*/
public function __construct($message, array $config, $sql, $code = 10500)
{
$this->message = $message;
$this->code = $code;
$this->setData('Database Status', [
'Error Code' => $code,
'Error Message' => $message,
'Error SQL' => $sql,
]);
unset($config['username'], $config['password']);
$this->setData('Database Config', $config);
}
}