net.yadaframework.exceptions.YadaInternalException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yadaweb Show documentation
Show all versions of yadaweb Show documentation
Some useful tasks for the Yada Framework
package net.yadaframework.exceptions;
import org.slf4j.helpers.MessageFormatter;
/**
* Unchecked exception thrown when something is inconsistent
*
*/
public class YadaInternalException extends RuntimeException {
private static final long serialVersionUID = -1L;
public YadaInternalException() {
}
public YadaInternalException(String message) {
super(message);
}
/**
* Build the message using slf4j log format syntax
* @param format a string with {} placeholders for parameters
* @param params parameters to replace at the {} position
*/
public YadaInternalException(String format, Object... params) {
super(MessageFormatter.arrayFormat(format, params).getMessage());
}
/**
* Build the message using slf4j log format syntax
* @param format a string with {} placeholders for parameters
* @param params parameters to replace at the {} position
*/
public YadaInternalException(Throwable cause, String format, Object... params) {
super(MessageFormatter.arrayFormat(format, params).getMessage(), cause);
}
public YadaInternalException(Throwable cause) {
super(cause);
}
public YadaInternalException(String message, Throwable cause) {
super(message, cause);
}
}