
org.ow2.bonita.facade.exception.BonitaInternalException Maven / Gradle / Ivy
package org.ow2.bonita.facade.exception;
import org.ow2.bonita.util.BonitaRuntimeException;
import org.ow2.bonita.util.ExceptionManager;
/**
*
* Thrown if an internal Bonita error occurred.
* Please contact Bonita by using the mailing list bonita AT ow2.org
*
* @author Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras
*
*/
public class BonitaInternalException extends BonitaRuntimeException {
private static final long serialVersionUID = 2673048366400783426L;
/**
* Constructs a BonitaInternalException with the specified detail message and the throwable cause.
* @param message msg the detail message.
* @param cause exception causing the abort.
*/
public BonitaInternalException(String message, Throwable cause) {
super(message, cause);
}
/**
* Constructs a BonitaInternalException with the specified detail message.
* @param message the detail message.
*/
public BonitaInternalException(String message) {
super(message);
}
public static BonitaInternalException build(RuntimeException exception) {
String message = exception.getMessage();
if (exception instanceof BonitaRuntimeException) {
return new BonitaInternalException(message, exception);
}
String msg = ExceptionManager.getInstance().getMessage("BIE1", message);
return new BonitaInternalException(msg, exception);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy