3 namespace Drupal\Core\Entity\Exception;
6 * Exception thrown if an entity type is not represented by a class.
8 * This might occur by calling a static method on an abstract class.
10 * @see \Drupal\Core\Entity\Entity::getEntityTypeFromStaticClass()
12 class NoCorrespondingEntityClassException extends \Exception {
15 * Constructs an NoCorrespondingEntityClassException.
17 * @param string $class
18 * The class which does not correspond to an entity type.
20 public function __construct($class) {
21 $message = sprintf('The %s class does not correspond to an entity type.', $class);
22 parent::__construct($message);