Direct known subclasses:
BadFunctionCallException, DomainException, InvalidArgumentException, LengthException, OutOfRangeException
(PHP 5 >= 5.1.0, PHP 7)
Exception that represents error in the program logic. This kind of exception should lead directly to a fix in your code.
Direct known subclasses:
BadFunctionCallException, DomainException, InvalidArgumentException, LengthException, OutOfRangeException
LogicException example from Drupal;
if (!isset($context['target_instance'])) {
throw new \LogicException('$context[\'target_instance\'] must be set to denormalize with the FieldItemNormalizer');
}
if ($context['target_instance']->getParent() == NULL) {
throw new \LogicException('The field item passed in via $context[\'target_instance\'] must have a parent set.');
}