diff core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php	Thu May 09 15:34:47 2019 +0100
@@ -49,7 +49,8 @@
       return NULL;
     }
 
-    throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist.', $plugin_id));
+    $valid_ids = implode(', ', array_keys($definitions));
+    throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist. Valid plugin IDs for %s are: %s', $plugin_id, static::class, $valid_ids));
   }
 
   /**