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

org.molgenis.data.security.user.UnknownUserException Maven / Gradle / Ivy

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

import static java.util.Objects.requireNonNull;

import org.molgenis.i18n.CodedRuntimeException;

public class UnknownUserException extends CodedRuntimeException {
  private static final String ERROR_CODE = "DS17";
  private final String username;

  public UnknownUserException(String username) {
    super(ERROR_CODE);
    this.username = requireNonNull(username);
  }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy