-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
103 changed files
with
4,378 additions
and
4,093 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace Doctrine\DBAL\Driver; | ||
|
||
use Doctrine\DBAL\Driver\Exception as ExceptionInterface; | ||
use Exception as BaseException; | ||
|
||
/** | ||
* Base implementation of the {@link Exception} interface. | ||
* | ||
* @internal | ||
* | ||
* @psalm-immutable | ||
*/ | ||
abstract class AbstractException extends BaseException implements ExceptionInterface | ||
{ | ||
/** | ||
* The driver specific error code. | ||
* | ||
* @var int|string|null | ||
*/ | ||
private $errorCode; | ||
|
||
/** | ||
* The SQLSTATE of the driver. | ||
* | ||
* @var string|null | ||
*/ | ||
private $sqlState; | ||
|
||
/** | ||
* @param string $message The driver error message. | ||
* @param string|null $sqlState The SQLSTATE the driver is in at the time the error occurred, if any. | ||
* @param int|string|null $errorCode The driver specific error code if any. | ||
*/ | ||
public function __construct($message, $sqlState = null, $errorCode = null) | ||
{ | ||
parent::__construct($message); | ||
|
||
$this->errorCode = $errorCode; | ||
$this->sqlState = $sqlState; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getErrorCode() | ||
{ | ||
return $this->errorCode; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getSQLState() | ||
{ | ||
return $this->sqlState; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.