From: Alexander Ebert Date: Fri, 22 Dec 2017 10:33:49 +0000 (+0100) Subject: Use more suitable exception X-Git-Tag: 3.1.0_Beta_5~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=199f54453d38ff8aa51af49341d7e302201afb94;p=GitHub%2FWoltLab%2FWCF.git Use more suitable exception --- diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index a4724595de..3cd64237d9 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -19,6 +19,7 @@ use wcf\system\cache\builder\UserGroupPermissionCacheBuilder; use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\event\EventHandler; +use wcf\system\exception\ImplementationException; use wcf\system\user\signature\SignatureCache; use wcf\system\user\storage\UserStorageHandler; use wcf\system\WCF; @@ -276,7 +277,7 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject { if ($parameters['avatar'] !== null) { if (!($parameters['avatar'] instanceof IUserAvatar)) { - throw new \RuntimeException("Object '".get_class($parameters['avatar'])."' does not implement '".IUserAvatar::class."'."); + throw new ImplementationException(get_class($parameters['avatar']), IUserAvatar::class); } $this->avatar = $parameters['avatar'];