KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2KB

  1. <?php
  2. /**
  3. * Horde YAML package
  4. *
  5. * This package is heavily inspired by the Spyc PHP YAML
  6. * implementation (http://spyc.sourceforge.net/), and portions are
  7. * copyright 2005-2006 Chris Wanstrath.
  8. *
  9. * @author Chris Wanstrath (chris@ozmm.org)
  10. * @author Chuck Hagenbuch (chuck@horde.org)
  11. * @author Mike Naberezny (mike@maintainable.com)
  12. * @license http://opensource.org/licenses/bsd-license.php BSD
  13. * @category Horde
  14. * @package Horde_Yaml
  15. */
  16. /**
  17. * Exception class for exceptions thrown by Horde_Yaml
  18. *
  19. * @category Horde
  20. * @package Horde_Yaml
  21. */
  22. class Horde_Yaml_Exception extends Exception
  23. {
  24. public function __construct($message = null, $code_or_lasterror = 0)
  25. {
  26. if (is_array($code_or_lasterror)) {
  27. if ($message) {
  28. $message .= $code_or_lasterror['message'];
  29. } else {
  30. $message = $code_or_lasterror['message'];
  31. }
  32. $this->file = $code_or_lasterror['file'];
  33. $this->line = $code_or_lasterror['line'];
  34. $code = $code_or_lasterror['type'];
  35. } else {
  36. $code = $code_or_lasterror;
  37. }
  38. parent::__construct($message, $code);
  39. }
  40. }