ExceptionConverterDriver.php 950 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Doctrine\DBAL\Driver;
  3. use Doctrine\DBAL\Driver\DriverException as TheDriverException;
  4. use Doctrine\DBAL\Exception\DriverException;
  5. /**
  6. * Contract for a driver that is capable of converting DBAL driver exceptions into standardized DBAL driver exceptions.
  7. *
  8. * @deprecated
  9. */
  10. interface ExceptionConverterDriver
  11. {
  12. /**
  13. * Converts a given DBAL driver exception into a standardized DBAL driver exception.
  14. *
  15. * It evaluates the vendor specific error code and SQLSTATE and transforms
  16. * it into a unified {@link DriverException} subclass.
  17. *
  18. * @deprecated
  19. *
  20. * @param string $message The DBAL exception message to use.
  21. * @param TheDriverException $exception The DBAL driver exception to convert.
  22. *
  23. * @return DriverException An instance of one of the DriverException subclasses.
  24. */
  25. public function convertException($message, TheDriverException $exception);
  26. }