Commit e1bd04f8 authored by Tobias Schultze's avatar Tobias Schultze

make RetryableException a marker interface

parent a5d1ead1
...@@ -26,6 +26,6 @@ namespace Doctrine\DBAL\Exception; ...@@ -26,6 +26,6 @@ namespace Doctrine\DBAL\Exception;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.6 * @since 2.6
*/ */
class DeadlockException extends RetryableException class DeadlockException extends ServerException implements RetryableException
{ {
} }
...@@ -26,6 +26,6 @@ namespace Doctrine\DBAL\Exception; ...@@ -26,6 +26,6 @@ namespace Doctrine\DBAL\Exception;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.6 * @since 2.6
*/ */
class LockWaitTimeoutException extends RetryableException class LockWaitTimeoutException extends ServerException implements RetryableException
{ {
} }
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
namespace Doctrine\DBAL\Exception; namespace Doctrine\DBAL\Exception;
/** /**
* Base class for all exceptions where retrying the transaction makes sense. * Marker interface for all exceptions where retrying the transaction makes sense.
* *
* @author Tobias Schultze <http://tobion.de> * @author Tobias Schultze <http://tobion.de>
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.6 * @since 2.6
*/ */
abstract class RetryableException extends ServerException interface RetryableException
{ {
} }
...@@ -102,8 +102,9 @@ class RetryWrapper ...@@ -102,8 +102,9 @@ class RetryWrapper
* The callable is only re-executed for temporary database errors where retrying * The callable is only re-executed for temporary database errors where retrying
* the failed transaction after a short delay usually resolves the problem. Such * the failed transaction after a short delay usually resolves the problem. Such
* errors are for example deadlocks and lock wait timeouts. Internally the raised * errors are for example deadlocks and lock wait timeouts. Internally the raised
* exception must extend RetryableException. Other exceptions like syntax errors * exception must implement the marker interface RetryableException. Other exceptions
* or constraint violations will not cause the callable to be re-executed. * like syntax errors or constraint violations will not cause the callable to be
* re-executed.
* *
* All arguments given will be passed through to the wrapped callable. * All arguments given will be passed through to the wrapped callable.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment