diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-27 10:37:12 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-27 21:00:02 +0200 |
commit | 5549641f1f977ab2b105b8f9d7b8c6829c0e6d02 (patch) | |
tree | d2aed27bfc9ea13b29be2c9688f68b5e8763c8d0 /lib/public/encryption | |
parent | 3de945d13da0016cd8c602867ff18a33c2534418 (diff) | |
download | nextcloud-server-5549641f1f977ab2b105b8f9d7b8c6829c0e6d02.tar.gz nextcloud-server-5549641f1f977ab2b105b8f9d7b8c6829c0e6d02.zip |
improve error messages displayed to the user
Diffstat (limited to 'lib/public/encryption')
-rw-r--r-- | lib/public/encryption/exceptions/genericencryptionexception.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/public/encryption/exceptions/genericencryptionexception.php b/lib/public/encryption/exceptions/genericencryptionexception.php index e97f00c88bf..5648e5edf73 100644 --- a/lib/public/encryption/exceptions/genericencryptionexception.php +++ b/lib/public/encryption/exceptions/genericencryptionexception.php @@ -21,6 +21,7 @@ */ namespace OCP\Encryption\Exceptions; +use OC\HintException; /** * Class GenericEncryptionException @@ -28,28 +29,20 @@ namespace OCP\Encryption\Exceptions; * @package OCP\Encryption\Exceptions * @since 8.1.0 */ -class GenericEncryptionException extends \Exception { - - /** @var string */ - protected $hint; +class GenericEncryptionException extends HintException { /** * @param string $message + * @param string $hint * @param int $code * @param \Exception $previous * @since 8.1.0 */ - public function __construct($message = '', $code = 0, \Exception $previous = null, $hint = '') { + public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { if (empty($message)) { $message = 'Unspecified encryption exception'; } - parent::__construct($message, $code, $previous); - - $this->hint = $hint; - } - - public function getHint() { - return $this->hint; + parent::__construct($message, $hint, $code, $previous); } } |