Exception.php 756 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\DBAL\Driver;
  4. use Throwable;
  5. /**
  6. * @psalm-immutable
  7. */
  8. interface Exception extends Throwable
  9. {
  10. /**
  11. * Returns the driver specific error code if available.
  12. *
  13. * @deprecated Use {@link getCode()} or {@link getSQLState()} instead
  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 SQLSTATE the driver was in at the time the error occurred.
  23. *
  24. * Returns null if the driver does not provide a SQLSTATE for the error occurred.
  25. *
  26. * @return string|null
  27. */
  28. public function getSQLState();
  29. }