Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / file_mdm / src / FileMetadataException.php
diff --git a/web/modules/contrib/file_mdm/src/FileMetadataException.php b/web/modules/contrib/file_mdm/src/FileMetadataException.php
new file mode 100644 (file)
index 0000000..ac3c2b1
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace Drupal\file_mdm;
+
+/**
+ * Exception thrown by file_mdm and plugins on failures.
+ */
+class FileMetadataException extends \Exception {
+
+  /**
+   * Constructs a FileMetadataException object.
+   */
+  public function __construct($message, $plugin_id = NULL, $method = NULL, \Exception $previous = NULL) {
+    $msg = $message;
+    $msg .= $plugin_id ? " (plugin: {$plugin_id})" : "";
+    $msg .= $method ? " (method: {$method})" : "";
+    parent::__construct($msg, 0, $previous);
+  }
+
+}