InvalidSearchTypeException.class.php 565 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Custom exception when an invalid search type is given
  4. *
  5. * @author Christopher Han <xiphux@gmail.com>
  6. * @copyright Copyright (c) 2012 Christopher Han
  7. * @package GitPHP
  8. * @subpackage Exception
  9. */
  10. class GitPHP_InvalidSearchTypeException extends GitPHP_MessageException
  11. {
  12. /**
  13. * Constructor
  14. *
  15. * @param string $message string
  16. * @param integer $code exception code
  17. */
  18. public function __construct($message = '', $code = 0)
  19. {
  20. if (empty($message))
  21. $message = 'Invalid search type';
  22. parent::__construct($message, true, 200, $code);
  23. }
  24. }