Project

Profile

Help

Suppressing Warning Ouput

Added by Anonymous about 18 years ago

Legacy ID: #4017494 Legacy Poster: Martin Roberts (robertmm)

How do I suppress the warning output from within a Java Program? Martin


Replies (1)

RE: Suppressing Warning Ouput - Added by Anonymous about 18 years ago

Legacy ID: #4017555 Legacy Poster: Michael Kay (mhkay)

The cleanest approach might be to write your own ErrorListener (probably by subclassing StandardErrorListener) and change the warning() method. You can register an ErrorListener using JAXP interfaces if using XSLT, or via Configuration.setErrorListener() in XQuery. Alternatively, the equivalent to the -w0 flag on the Transform command line is factory.setAttribute(FeatureKeys.RECOVERY_POLICY, new Integer(Configuration.RECOVER_SILENTLY)); This is a bit stronger than suppressing warnings; it also suppresses information about "recoverable errors" such as template conflicts in XSLT.

    (1-1/1)

    Please register to reply