From 280b49db3ccccb2c3db34d429cf760221d56116f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 6 Jan 2016 18:01:17 +0100 Subject: [PATCH] Replace getExceptionID() by logThrowable() --- .../lib/system/background/BackgroundQueueHandler.class.php | 4 ++-- .../background/job/EmailDeliveryBackgroundJob.class.php | 2 +- .../system/cronjob/BackgroundQueueCleanUpCronjob.class.php | 2 +- .../email/transport/exception/PermanentFailure.class.php | 3 +-- .../email/transport/exception/TransientFailure.class.php | 3 +-- .../files/lib/system/recaptcha/RecaptchaHandlerV2.class.php | 4 ++-- .../lib/system/user/storage/UserStorageHandler.class.php | 4 ++-- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php index dedd7dd656..071161a84f 100644 --- a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php @@ -101,7 +101,7 @@ class BackgroundQueueHandler extends SingletonFactory { } else { // job failed too often: log - if ($e instanceof LoggedException) $e->getExceptionID(); + \wcf\functions\exception\logThrowable($e); } } finally { @@ -170,7 +170,7 @@ class BackgroundQueueHandler extends SingletonFactory { } catch (\Exception $e) { // job is completely broken: log - if ($e instanceof LoggedException) $e->getExceptionID(); + \wcf\functions\exception\logThrowable($e); } finally { // remove entry of processed job diff --git a/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php b/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php index 8d013fe6fd..c7af633e1f 100644 --- a/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php +++ b/wcfsetup/install/files/lib/system/background/job/EmailDeliveryBackgroundJob.class.php @@ -76,7 +76,7 @@ class EmailDeliveryBackgroundJob extends AbstractBackgroundJob { } catch (PermanentFailure $e) { // no need for retrying. Eat Exception and log the error. - $e->getExceptionID(); + \wcf\functions\exception\logThrowable($e); } } } diff --git a/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php index 882d8646aa..b5caf9d854 100644 --- a/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php @@ -55,7 +55,7 @@ class BackgroundQueueCleanUpCronjob extends AbstractCronjob { } catch (\Exception $e) { // job is completely broken: log - if ($e instanceof LoggedException) $e->getExceptionID(); + \wcf\functions\exception\logThrowable($e); } } diff --git a/wcfsetup/install/files/lib/system/email/transport/exception/PermanentFailure.class.php b/wcfsetup/install/files/lib/system/email/transport/exception/PermanentFailure.class.php index a2dc7c1f19..c49fe90ec8 100644 --- a/wcfsetup/install/files/lib/system/email/transport/exception/PermanentFailure.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/exception/PermanentFailure.class.php @@ -1,6 +1,5 @@ getExceptionID(); + \wcf\functions\exception\logThrowable($e); } WCF::getSession()->register('recaptchaDone', true); diff --git a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php index 712d922f24..dfe02e3283 100644 --- a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php @@ -248,12 +248,12 @@ class UserStorageHandler extends SingletonFactory { WCF::getDB()->commitTransaction(); break; } - catch (SystemException $e) { + catch (\Exception $e) { WCF::getDB()->rollbackTransaction(); // retry up to 2 times if (++$i === 2) { - $e->getExceptionID(); + \wcf\functions\exception\logThrowable($e); break; } -- 2.20.1