Hi Colin,
You can catch thrown exceptions and log it. A simple
try {
...
} catch (exception) {
print("Error :" + exception.message);
} finally {
...
}should help you for development if you're using the embedded jetty (look at the jetty output)
-- Olivier Billard
Colin Paul Adams wrote:
In the CForms xml binding script, there is code similar to:
function loadDocument(uri) {
var parser = null;
var source = null;
var resolver = null;
try {
parser = cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
source = resolver.resolveURI(uri);
var is = new Packages.org.xml.sax.InputSource(source.getInputStream());
is.setSystemId(source.getURI());
var document = parser.parseDocument(is);
cocoon.log.debug (document);
return document; } finally {
if (source != null)
resolver.release(source);
cocoon.releaseComponent(parser);
cocoon.releaseComponent(resolver);
}
}
but I am getting a value of null for the document variable. How do I find out why the parser is failing to parse the document content (which should be perctly valid xml)?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
