hintexception.php 604 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OC;
  9. class HintException extends \Exception {
  10. private $hint;
  11. public function __construct($message, $hint = '', $code = 0, Exception $previous = null) {
  12. $this->hint = $hint;
  13. parent::__construct($message, $code, $previous);
  14. }
  15. public function __toString() {
  16. return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n";
  17. }
  18. public function getHint() {
  19. return $this->hint;
  20. }
  21. }