IntegrityConstraintViolationException.php

Same filename and directory in other branches
  1. 8.9.x core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php
  2. 10 core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php
  3. 11.x core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php

Namespace

Drupal\Core\Database

File

core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php

View source
<?php

namespace Drupal\Core\Database;


/**
 * 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.
 */
class IntegrityConstraintViolationException extends \RuntimeException implements DatabaseException {

}

Classes

Title Deprecated Summary
IntegrityConstraintViolationException Exception thrown if a query would violate an integrity constraint.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.