add:  if (cocoon.log.isDebugEnabled()) { cocoon.log.debug("edit-document.js::editDocument() after usecase.execute(), hasErrors ? " + usecase.hasErrors()); } 
context: function editDocument() {    var usecaseName = cocoon.parameters["lenya.usecase"];        var usecaseResolver;    var usecase;        try {        usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");        usecase = usecaseResolver.resolve(usecaseName);        var flowHelper = cocoon.getComponent("org.apache.lenya.cms.cocoon.flow.FlowHelper");        var request = flowHelper.getRequest(cocoon);        var sourceUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(request);        usecase.setSourceURL(sourceUrl);        usecase.setName(usecaseName);        usecase.checkPreconditions();        usecase.lockInvolvedObjects();                usecase.execute();        // FIXME: handle error messages        //if (usecase.hasErrors()) {        //}        if(_getParameter("noStatus", "false") == "false")            cocoon.sendStatus(_getParameter("status", 204));        else            cocoon.redirectTo(_getParameter("redirectUrl", "FIXME"));    } catch (exception) {	/* FIXME: This is unclean because the flow will not return a value	   if there is an exception */        cocoon.log.error("Can not edit document.", exception);            }    finally {        /* done with usecase component, tell usecaseResolver to release it */        if (usecaseResolver != null) {            if (usecase != null) {                usecaseResolver.release(usecase);                usecase = undefined;            }            cocoon.releaseComponent(usecaseResolver);        }    }        }
meta: 791	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/30dca72bde1938ec256d999c97b05567424874a7/edit-document.js/buggy/src/webapp/lenya/usecases/edit-document.js