本文整理汇总了PHP中ErrorHandler::printError方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorHandler::printError方法的具体用法?PHP ErrorHandler::printError怎么用?PHP ErrorHandler::printError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorHandler
的用法示例。
在下文中一共展示了ErrorHandler::printError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
if ($timeSel == "") {
$timeSel = "depart";
}
if ($results == "" || $results > 6 || $results < 1) {
$results = 6;
}
if ($date == "") {
$date = date("dmy");
}
//TODO: move this to constructor of ConnectionRequest
//reform date to needed train structure
preg_match("/(..)(..)(..)/si", $date, $m);
$date = "20" . $m[3] . $m[2] . $m[1];
if ($time == "") {
$time = date("Hi");
}
//reform time to wanted structure
preg_match("/(..)(..)/si", $time, $m);
$time = $m[1] . ":" . $m[2];
if ($typeOfTransport == "") {
$typeOfTransport = "train";
}
if (!isset($from) || !isset($to)) {
$e = new Exception("You didn't use this right. You should specify where to and where from you are traveling.", 1);
$eh = new ErrorHandler($e, $format);
$eh->printError();
} else {
$request = new ConnectionRequest($from, $to, $time, $date, $timeSel, $results, $lang, $format, $typeOfTransport);
$call = new ConnectionsCall("connections", $request);
$call->executeCall();
}
示例2: processError
protected function processError(Exception $e)
{
writeLog($_SERVER['HTTP_USER_AGENT'], "", "", "Error in {$this->functionname} " . $e->getMessage(), $_SERVER['REMOTE_ADDR']);
$eh = new ErrorHandler($e, $this->request->getFormat());
$eh->printError();
}