PluginHelper::createIndexPlugin() should pass on message from PluginException

Created on 20 May 2024, 27 days ago
Updated 8 June 2024, 8 days ago

Problem/Motivation

PluginHelper::createIndexPlugin() ignores the caught PluginException's message:

    catch (PluginException) {
      throw new SearchApiException("Unknown $type plugin with ID '$plugin_id'");

However, in the case that a plugin ID is not found, PluginException now includes a helpful message which lists the existing plugin IDs. This is very useful when you've made a typo!

Steps to reproduce

Proposed resolution

Use the message from the caught exception as the message in the new one.

Remaining tasks

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

General code

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024