package jfun.yan.xml.nuts.optional;
import jfun.yan.Component;
import jfun.yan.SimpleComponent;
import jfun.yan.xml.nut.ComponentNut;
/**
* A tag that reports error message.
* <p>
* @author Ben Yu
* Nov 11, 2005 3:44:10 PM
*/
public class FailNut extends ComponentNut {
private String msg;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Component eval(){
return new SimpleComponent(void.class){
public Object create(){
throw raise(msg);
}
};
}
}