function createInvalidPluginDefinitionError(msg, pluginDef) {
    const err = new Error(msg);
    err.code = constants$4.INVALID_PLUGIN_DEFINITION;
    err.pluginDef = pluginDef;
    return err;
  }
Creates an error object to be thrown when a plugin definition is invalid
@static
@param {string} msg - Error message
@param {PluginDefinition} [pluginDef] - Problematic plugin definition
@public
@returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}