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

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

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

import static java.util.Objects.requireNonNull;

@SuppressWarnings({"squid:MaximumInheritanceDepth"})
public class UnknownPackageException extends UnknownDataException {
  private static final String ERROR_CODE = "D13";

  private final String packageName;

  public UnknownPackageException(String packageName) {
    super(ERROR_CODE);
    this.packageName = requireNonNull(packageName);
  }

  public Object getPackageName() {
    return packageName;
  }

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

  @Override
  public String getErrorCode() {
    return ERROR_CODE;
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy