ConnectionException.php 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Doctrine\DBAL;
  3. class ConnectionException extends DBALException
  4. {
  5. /**
  6. * @return \Doctrine\DBAL\ConnectionException
  7. */
  8. public static function commitFailedRollbackOnly()
  9. {
  10. return new self('Transaction commit failed because the transaction has been marked for rollback only.');
  11. }
  12. /**
  13. * @return \Doctrine\DBAL\ConnectionException
  14. */
  15. public static function noActiveTransaction()
  16. {
  17. return new self('There is no active transaction.');
  18. }
  19. /**
  20. * @return \Doctrine\DBAL\ConnectionException
  21. */
  22. public static function savepointsNotSupported()
  23. {
  24. return new self('Savepoints are not supported by this driver.');
  25. }
  26. /**
  27. * @return \Doctrine\DBAL\ConnectionException
  28. */
  29. public static function mayNotAlterNestedTransactionWithSavepointsInTransaction()
  30. {
  31. return new self('May not alter the nested transaction with savepoints behavior while a transaction is open.');
  32. }
  33. }