|
|
|
@ -89,10 +89,14 @@ try {
|
|
|
|
$baseuri = OC::$WEBROOT . '/public.php/' . $service . '/';
|
|
|
|
$baseuri = OC::$WEBROOT . '/public.php/' . $service . '/';
|
|
|
|
require_once $file;
|
|
|
|
require_once $file;
|
|
|
|
} catch (Exception $ex) {
|
|
|
|
} catch (Exception $ex) {
|
|
|
|
$status = 500;
|
|
|
|
if ($ex instanceof ServiceUnavailableException && $ex->getCode === 0) {
|
|
|
|
if ($ex instanceof ServiceUnavailableException) {
|
|
|
|
|
|
|
|
$status = 503;
|
|
|
|
$status = 503;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($ex->getCode() > 0) {
|
|
|
|
|
|
|
|
$status = $ex->getCode();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$status = 500;
|
|
|
|
|
|
|
|
}
|
|
|
|
//show the user a detailed error page
|
|
|
|
//show the user a detailed error page
|
|
|
|
Server::get(LoggerInterface::class)->error($ex->getMessage(), ['app' => 'public', 'exception' => $ex]);
|
|
|
|
Server::get(LoggerInterface::class)->error($ex->getMessage(), ['app' => 'public', 'exception' => $ex]);
|
|
|
|
Server::get(ITemplateManager::class)->printExceptionErrorPage($ex, $status);
|
|
|
|
Server::get(ITemplateManager::class)->printExceptionErrorPage($ex, $status);
|
|
|
|
|