DriverException.php 921 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Doctrine\DBAL\Driver;
  3. use Throwable;
  4. /**
  5. * Contract for a driver exception.
  6. *
  7. * Driver exceptions provide the SQLSTATE of the driver
  8. * and the driver specific error code at the time the error occurred.
  9. */
  10. interface DriverException extends Throwable
  11. {
  12. /**
  13. * Returns the driver specific error code if available.
  14. *
  15. * Returns null if no driver specific error code is available
  16. * for the error raised by the driver.
  17. *
  18. * @return int|string|null
  19. */
  20. public function getErrorCode();
  21. /**
  22. * Returns the driver error message.
  23. *
  24. * @return string
  25. */
  26. public function getMessage();
  27. /**
  28. * Returns the SQLSTATE the driver was in at the time the error occurred.
  29. *
  30. * Returns null if the driver does not provide a SQLSTATE for the error occurred.
  31. *
  32. * @return string|null
  33. */
  34. public function getSQLState();
  35. }