if(epf instanceof ERDErrorPageInterface) { ((ERDErrorPageInterface)epf).setException(ex); }
    public WOActionResults reportException(Exception ex) {        WOActionResults newPage = null;        try {            ErrorPageInterface epf=D2W.factory().errorPage(session());            epf.setMessage(ex.toString());            epf.setNextPage(previousPageFromRequest());            newPage = (WOActionResults)epf;        } catch (Exception otherException) {            log.error("Exception while trying to report exception!", otherException);        }        return newPage;    }