Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Http / Exception / CacheableBadRequestHttpException.php
diff --git a/web/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php b/web/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php
new file mode 100644 (file)
index 0000000..4737c33
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\Core\Http\Exception;
+
+use Drupal\Core\Cache\CacheableDependencyInterface;
+use Drupal\Core\Cache\CacheableDependencyTrait;
+use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+
+/**
+ * A cacheable BadRequestHttpException.
+ */
+class CacheableBadRequestHttpException extends BadRequestHttpException implements CacheableDependencyInterface {
+
+  use CacheableDependencyTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+    $this->setCacheability($cacheability);
+    parent::__construct($message, $previous, $code);
+  }
+
+}