Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Exception / NoCorrespondingEntityClassException.php
1 <?php
2
3 namespace Drupal\Core\Entity\Exception;
4
5 /**
6  * Exception thrown if an entity type is not represented by a class.
7  *
8  * This might occur by calling a static method on an abstract class.
9  *
10  * @see \Drupal\Core\Entity\Entity::getEntityTypeFromStaticClass()
11  */
12 class NoCorrespondingEntityClassException extends \Exception {
13
14   /**
15    * Constructs an NoCorrespondingEntityClassException.
16    *
17    * @param string $class
18    *   The class which does not correspond to an entity type.
19    */
20   public function __construct($class) {
21     $message = sprintf('The %s class does not correspond to an entity type.', $class);
22     parent::__construct($message);
23   }
24
25 }