修正classmap中遗漏think\debug\Trace的路径 (#179)

* 修正classmap中遗漏think\debug\trace\Html和think\debug\trace\Console的路径

* 修正classmap中遗漏think\debug\Trace的路径

* 判断trace类型类是否存在
This commit is contained in:
CantonBolo
2016-06-30 11:44:59 +08:00
committed by 云无心
parent 2a7f46af00
commit 12081bb1e3
2 changed files with 9 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
namespace think\debug;
use think\Config;
use think\exception\ClassNotFoundException;
use think\Log;
use think\Request;
use think\Response;
@@ -31,7 +32,11 @@ class Trace
$class = false !== strpos($type, '\\') ? $type : '\\think\\debug\\trace\\' . ucwords($type);
unset($config['type']);
$trace = new $class($config);
if(class_exists($class)) {
$trace = new $class($config);
} else {
throw new ClassNotFoundException('class not exists:' . $class, $class);
}
if ($response instanceof Redirect) {
//TODO 记录