/** * 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"; } }
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); }
/** * Catch exceptions * * @param Exception $exception */ static function catchException($exception) { AJXP_XMLWriter::catchError($exception->getCode(), SystemTextEncoding::fromUTF8($exception->getMessage()), $exception->getFile(), $exception->getLine(), null); }
/** * Catch exceptions * * @param Exception $exception */ function catchException($exception) { AJXP_XMLWriter::catchError($exception->getCode(), $exception->getMessage(), $exception->getFile(), $exception->getLine(), null); }
/** * 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(); } }