Integer exitCode=new Integer (-9999); exitCode = (Integer) cd.sfResolve("code",exitCode,false); if (exitCode.intValue()!=0) { String msg = " Error running script [exit code ="+exitCode+"]:"+script.toString(); SmartFrogException sex = new SmartFrogException(msg, this); sex.add("script", script); sex.add("result", cd); if (sfLog().isErrorEnabled()) { sfLog().error(msg + "\n"+cd.toString());
Integer exitCode = new Integer(-9999); exitCode = (Integer)cd.sfResolve("code", exitCode, false); if (exitCode.intValue()!=0) { String msg = " Error running script [exit code ="+exitCode+"]:"+ script.toString(); SmartFrogException sex = new SmartFrogException(msg, this); sex.add("script", script); sex.add("result", cd); if (sfLog().isErrorEnabled()) { sfLog().error(msg+"\n"+cd.toString()); } throw sex;
private void checkResult(Object script, ComponentDescription cd) throws    SmartFrogResolutionException, SmartFrogException {    if (cd!=null) {    Integer exitCode=new Integer (-9999);    exitCode = (Integer) cd.sfResolve("code",exitCode,false);    if (exitCode.intValue()!=0) {        String msg = " Error running script [exit code ="+exitCode+"]:"+script.toString();        SmartFrogException sex = new SmartFrogException(msg, this);        sex.add("script", script);        sex.add("result", cd);        if (sfLog().isErrorEnabled()) {            sfLog().error(msg + "\n"+cd.toString());        }        throw sex;    }    }}