本文整理汇总了PHP中AJXP_XMLWriter::catchError方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_XMLWriter::catchError方法的具体用法?PHP AJXP_XMLWriter::catchError怎么用?PHP AJXP_XMLWriter::catchError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AJXP_XMLWriter
的用法示例。
在下文中一共展示了AJXP_XMLWriter::catchError方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catchException
/**
* Catch exceptions, @see catchError
* @param Exception $exception
*/
public static function catchException($exception)
{
try {
AJXP_XMLWriter::catchError($exception->getCode(), SystemTextEncoding::fromUTF8($exception->getMessage()), $exception->getFile(), $exception->getLine(), $exception);
} catch (Exception $innerEx) {
error_log(get_class($innerEx) . " thrown within the exception handler!");
error_log("Original exception was: " . $innerEx->getMessage() . " in " . $innerEx->getFile() . " on line " . $innerEx->getLine());
error_log("New exception is: " . $innerEx->getMessage() . " in " . $innerEx->getFile() . " on line " . $innerEx->getLine() . " " . $innerEx->getTraceAsString());
print "Error";
}
}
示例2: fput_quota_hack
public static function fput_quota_hack($errno, $errstr, $errfile, $errline, $errcontext)
{
if (strpos($errstr, "Opening BINARY mode data connection") !== false) {
$errstr = "Transfer failed. Please check available disk space (quota)";
}
AJXP_XMLWriter::catchError($errno, $errstr, $errfile, $errline, $errcontext);
}
示例3: catchException
/**
* Catch exceptions
*
* @param Exception $exception
*/
static function catchException($exception)
{
AJXP_XMLWriter::catchError($exception->getCode(), SystemTextEncoding::fromUTF8($exception->getMessage()), $exception->getFile(), $exception->getLine(), null);
}
示例4: catchException
/**
* Catch exceptions
*
* @param Exception $exception
*/
function catchException($exception)
{
AJXP_XMLWriter::catchError($exception->getCode(), $exception->getMessage(), $exception->getFile(), $exception->getLine(), null);
}
示例5: catchException
/**
* Catch exceptions, @see catchError
* @param Exception $exception
*/
static function catchException($exception)
{
try {
AJXP_XMLWriter::catchError($exception->getCode(), SystemTextEncoding::fromUTF8($exception->getMessage()), $exception->getFile(), $exception->getLine(), null);
} catch (Exception $innerEx) {
print get_class($innerEx) . " thrown within the exception handler! Message was: " . $innerEx->getMessage() . " in " . $innerEx->getFile() . " on line " . $innerEx->getLine() . " " . $innerEx->getTraceAsString();
}
}