When a plugin can't be found, DiscoveryTrait::doGetDefinition() throws this exception:
throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist.', $plugin_id));
This could do with improvement on two counts:
- it doesn't tell you what the type of the requested plugin is. Plugin names are often repeated or similar across different types, especially with derived plugins (eg I had this crash because a SearchAPI plugin wasn't found, whose name looked a lot like a Facets provider plugin, or a Views display plugin).
- because this exception is caught somewhere and shown as an error message, there is no backtrace