summaryrefslogtreecommitdiffstats
path: root/lib/hintexception.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-03-03 12:06:00 +0100
committerBart Visscher <bartv@thisnet.nl>2013-05-07 19:59:46 +0200
commit07df94def66a78bda40560a5bdd31058f61e2238 (patch)
treede291a1325519049f4276ab665ce695189bc23c0 /lib/hintexception.php
parent2208313e02f0c1d5ae728115f81e040eaedaa0dc (diff)
downloadnextcloud-server-07df94def66a78bda40560a5bdd31058f61e2238.tar.gz
nextcloud-server-07df94def66a78bda40560a5bdd31058f61e2238.zip
Convert OC_Config to object interface
Diffstat (limited to 'lib/hintexception.php')
-rw-r--r--lib/hintexception.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/hintexception.php b/lib/hintexception.php
new file mode 100644
index 00000000000..8c64258435b
--- /dev/null
+++ b/lib/hintexception.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC;
+
+class HintException extends \Exception
+{
+ private $hint;
+
+ public function __construct($message, $hint, $code = 0, Exception $previous = null) {
+ $this->hint = $hint;
+ parent::__construct($message, $code, $previous);
+ }
+
+ public function __toString() {
+ return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n";
+ }
+
+ public function getHint() {
+ return $this->hint;
+ }
+}