From 07158f32b66346662fc1933fc1bdf4907ca1bef8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 31 Aug 2015 14:18:32 +0200 Subject: [PATCH] Backport of e09c704 --- wcfsetup/install/files/lib/system/WCF.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index e423c5c355..ef059e8f2d 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -268,8 +268,10 @@ class WCF { * * @param \Exception $e */ - public static final function handleException(\Exception $e) { + public static final function handleException($e) { try { + if (!($e instanceof \Exception)) throw $e; + if ($e instanceof IPrintableException) { $e->show(); exit; @@ -278,6 +280,9 @@ class WCF { // repack Exception self::handleException(new SystemException($e->getMessage(), $e->getCode(), '', $e)); } + catch (\Throwable $exception) { + die("
WCF::handleException() Unhandled exception: ".$exception->getMessage()."\n\n".$exception->getTraceAsString());
+		}
 		catch (\Exception $exception) {
 			die("
WCF::handleException() Unhandled exception: ".$exception->getMessage()."\n\n".$exception->getTraceAsString());
 		}
-- 
2.20.1