package vut.msa.exceptions;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 * Trieda sluzi na zachytenie vynimky a zobrazenie chybovej spravy na JSF stranke.
 */
public class FacesException extends Exception {

    public FacesException(String message, String detail) {
        super();
        FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO,
                            message, detail);
        FacesContext.getCurrentInstance().addMessage(null, msg);
    }

}
