exception.inc 623 B

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