exception.inc 769 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Custom exception class for the migrate module.
  5. */
  6. class MigrateException extends Exception {
  7. /**
  8. * The level of the error being reported (a Migration::MESSAGE_* constant)
  9. *
  10. * @var int
  11. */
  12. protected $level;
  13. public function getLevel() {
  14. return $this->level;
  15. }
  16. /**
  17. * The status to record in the map table for the current item (a
  18. * MigrateMap::STATUS_* constant)
  19. *
  20. * @var int
  21. */
  22. protected $status;
  23. public function getStatus() {
  24. return $this->status;
  25. }
  26. public function __construct($message, $level = Migration::MESSAGE_ERROR,
  27. $status = MigrateMap::STATUS_FAILED) {
  28. $this->level = $level;
  29. $this->status = $status;
  30. parent::__construct($message);
  31. }
  32. }