exception.inc 672 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Contains SearchApiException.
  5. */
  6. /**
  7. * Represents an exception or error that occurred in some part of the Search API
  8. * framework.
  9. */
  10. class SearchApiException extends Exception {
  11. /**
  12. * Creates a new SearchApiException.
  13. *
  14. * @param $message
  15. * A string describing the cause of the exception.
  16. */
  17. public function __construct($message = NULL) {
  18. if (!$message) {
  19. $message = t('An error occurred in the Search API framework.');
  20. }
  21. parent::__construct($message);
  22. }
  23. }
  24. /**
  25. * Represents an exception that occurred in a data source controller.
  26. */
  27. class SearchApiDataSourceException extends SearchApiException {
  28. }