本文整理汇总了PHP中ErrorException::__toString方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorException::__toString方法的具体用法?PHP ErrorException::__toString怎么用?PHP ErrorException::__toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorException
的用法示例。
在下文中一共展示了ErrorException::__toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __toString
public function __toString()
{
if ($this->isWrote === false) {
$this->isWrote = true;
return $this->getMessage() . "[Sooh_Base_Error]" . $this->getTraceAsString();
} else {
return parent::__toString();
}
}
示例2: occurred
case E_CORE_WARNING:
case E_USER_WARNING:
case E_WARNING:
$err = Debug::LEVEL_WARNING;
break;
case E_USER_DEPRECATED:
case E_USER_NOTICE:
case E_DEPRECATED:
case E_NOTICE:
case E_STRICT:
default:
$err = Debug::LEVEL_INFO;
break;
}
$e = new \ErrorException($errstr, 0, $errno, $errfile, $errline);
Debug::log('An error occurred (' . $e->__toString() . ')', $err);
throw $e;
});
Obj::$config = new Configuration_Loader(__DIR__ . '/../conf/');
Obj::$router = new Router();
$routes = Obj::$config->get('routes', function (&$v, $k) {
// -- if a 'app' part is not set, it has to be constructed
if (!isset($v['app'])) {
if (!isset($v['controller'], $v['action'])) {
throw new \Exception('The route does not have the required arguments');
}
$v['app'] = $v['controller'] . ':' . $v['action'];
}
$v = new Route($v['app'], $v['pattern']);
});
foreach ($routes as $name => &$route) {