3 namespace Drupal\media_entity;
6 * Generic Plugin exception class to be thrown when no more specific class
9 class MediaTypeException extends \Exception {
12 * Form element name that this exception belongs to.
19 * Construct the exception.
21 * @param string $element
22 * [optional] Name of form element that exception refers to.
23 * @param string $message
24 * [optional] The Exception message to throw.
26 * [optional] The Exception code.
27 * @param \Exception $previous
28 * [optional] The previous exception used for the exception chaining.
30 public function __construct($element = NULL, $message = "", $code = 0, \Exception $previous = NULL) {
31 parent::__construct($message, $code, $previous);
32 $this->element = $element;
41 public function getElement() {
42 return $this->element;