You are here

class IntegrityConstraintViolationException in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php \Drupal\Core\Database\IntegrityConstraintViolationException

Exception thrown if a query would violate an integrity constraint.

This exception is thrown e.g. when trying to insert a row that would violate a unique key constraint.

Hierarchy

Expanded class hierarchy of IntegrityConstraintViolationException

9 files declare their use of IntegrityConstraintViolationException
Connection.php in core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
DatabaseLockBackend.php in core/lib/Drupal/Core/Lock/DatabaseLockBackend.php
EntityDefinitionUpdateTest.php in core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
ExceptionHandler.php in core/lib/Drupal/Core/Database/Driver/mysql/ExceptionHandler.php
Insert.php in core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php

... See full list

File

core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php, line 11

Namespace

Drupal\Core\Database
View source
class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException {

}

Members