ErrorException.php 658 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace easyTask\Exception;
  3. /**
  4. * Class ErrorException
  5. * @package EasyTask\Exception
  6. */
  7. class ErrorException extends \Exception
  8. {
  9. /**
  10. * 错误级别
  11. * @var int
  12. */
  13. protected $severity;
  14. /**
  15. * 构造函数
  16. * ErrorException constructor.
  17. * @param string $severity
  18. * @param string $errStr
  19. * @param string $errFile
  20. * @param string $errLine
  21. */
  22. public function __construct($severity, $errStr, $errFile, $errLine)
  23. {
  24. $this->line = $errLine;
  25. $this->file = $errFile;
  26. $this->code = 0;
  27. $this->message = $errStr;
  28. $this->severity = $severity;
  29. }
  30. }