common/src/main/java/org/beiter/michael/authn/jaas/common/Util.java
public static LoginException newLoginException(final String message, final Throwable cause) {

        Validate.notBlank(message, "The validated character sequence 'message' is null or empty");
        Validate.notNull(cause, "The validated object 'cause' is null");

        final LoginException loginException = new LoginException(message);
        loginException.initCause(cause);
        return loginException;
    }
public static LoginException newLoginException(final String message, final Throwable cause) {

        Validate.notBlank(message, "The validated character sequence 'message' is null or empty");
        Validate.notNull(cause, "The validated object 'cause' is null");

        final LoginException loginException = new LoginException(message);
        loginException.initCause(cause);
        return loginException;
    }
public static LoginException newLoginException ( final String message , final Throwable cause ) { Validate . notBlank ( message , "The validated character sequence 'message' is null or empty" ) ; Validate . notNull ( cause , "The validated object 'cause' is null" ) ; final LoginException loginException = new LoginException ( message ) ; loginException . initCause ( cause ) ; return loginException ; }
Create a {@code LoginException} with a cause.

@param message the detail message (which is saved for later retrieval by the
{@link java.lang.Exception#getMessage()} method).
@param cause   the cause (which is saved for later retrieval by the {@link java.lang.Exception#getCause()}
method). (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent or
unknown.)
@return a new {@code LoginException}
@throws NullPointerException     When the {@code message} or {@code cause} are {@code null}
@throws IllegalArgumentException When {@code message} is empty
@see Exception#Exception(String, Throwable)
Create a { @code LoginException } with a cause .