All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.data.UnknownPluginException Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
package org.molgenis.data;

import static java.lang.String.format;
import static java.util.Objects.requireNonNull;

/** Thrown when a Plugin is requested that doesn't exist */
// S2166 'Classes named like "Exception" should extend "Exception" or a subclass' often gives false
// positives at dev time
@SuppressWarnings("squid:MaximumInheritanceDepth")
public class UnknownPluginException extends UnknownDataException {
  private static final String ERROR_CODE = "D07";

  private final String id;

  public UnknownPluginException(String id) {
    super(ERROR_CODE);
    this.id = requireNonNull(id);
  }

  @Override
  public String getMessage() {
    return format("id:%s", id);
  }

  @Override
  protected Object[] getLocalizedMessageArguments() {
    return new Object[] {id};
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy