mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Specify explicit duplicate key exception in DB class
This commit is contained in:
parent
265db89448
commit
07110829e7
2 changed files with 7 additions and 1 deletions
|
@ -133,7 +133,7 @@ class DbConnection{
|
|||
}
|
||||
elseif($ex->getCode() == '23000'){
|
||||
// Duplicate key, bubble this up without logging it so the business logic can handle it
|
||||
throw($ex);
|
||||
throw new Exceptions\DuplicateDatabaseKeyException();
|
||||
}
|
||||
else{
|
||||
$done = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue