exception.inc 761 B

1234567891011121314151617181920212223242526272829303132333435
  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. * @var int
  10. */
  11. protected $level;
  12. public function getLevel() {
  13. return $this->level;
  14. }
  15. /**
  16. * The status to record in the map table for the current item (a
  17. * MigrateMap::STATUS_* constant)
  18. *
  19. * @var int
  20. */
  21. protected $status;
  22. public function getStatus() {
  23. return $this->status;
  24. }
  25. public function __construct($message, $level = Migration::MESSAGE_ERROR,
  26. $status = MigrateMap::STATUS_FAILED) {
  27. $this->level = $level;
  28. $this->status = $status;
  29. parent::__construct($message);
  30. }
  31. }