Authored by ziy

修改错误显示提示

... ... @@ -12,6 +12,13 @@ use Hood\Core\Server;
class Root
{
/**
* server file
* @var String
*/
protected $serviceFile;
/**
* 应用环境
* @var string
... ... @@ -94,7 +101,7 @@ class Root
APPLICATION_ENV,
$suffix
);
$serviceFile = APPLICATION_SYSTEM_CONFIG . DIRECTORY_SEPARATOR . implode('.', $serviceFileArray);
$this->serviceFile = $serviceFile = APPLICATION_SYSTEM_CONFIG . DIRECTORY_SEPARATOR . implode('.', $serviceFileArray);
return new Server($serviceFile);
}
}
\ No newline at end of file
... ...
... ... @@ -47,7 +47,7 @@ class MongoCore extends Root
$server = $this->getServerHost('nosql');
$_serverConfig = $server->getServerConfig('database', $this->_dbname);
if (empty($_serverConfig)) {
throw new MongoException('Mongo Servers Config Is Null.');
throw new MongoException('Mongo Servers Config Not DBName "' . $this->_dbname . '" <br />Config File: ' . $this->serviceFile);
}
$options = $server->getServerConfig('mongo');
$this->targetOptions = array_merge($this->targetOptions, $options);
... ...
... ... @@ -397,7 +397,7 @@ $error = $debugLogs['Error'];
<?php if(!empty($exception['message'])){ ?>
<ul class="phpdebugbar-widgets-list">
<li class="list-item">
<span class="message"><?php echo $exception['message'];?></span>
<span class="message" style="margin-bottom: 10px;"><?php echo $exception['message'];?></span>
<span class="filename"><?php echo $exception['file'],' # ',$exception['line'];?></span>
<span class="type"><?php echo $exception['type'];?></span>
<div style="display: block;">
... ...