On Wed, 2003-10-01 at 13:06, Simon Kitching wrote: > > try { > Log oldLog = digester.getLogger(); > digester.setLogger(new NoOpLog()); > digester.parse( > TestAll.getInputStream(this, "test2.xml")); > digester.setLogger(oldLog); > } > catch(Exception e) { > // yay - exception was correctly generated > // .... > }
hmm..try Log oldLog = digester.getLogger(); try { digester.setLogger(new NoOpLog()); digester.parse( TestAll.getInputStream(this, "test2.xml")); } catch(Exception e) { // yay ... etc } finally { digester.setLogger(oldLog); } :-) In fact, it probably doesn't matter a damn about restoring the old logger, as the test has failed. Still, don't want anyone thinking I can't handle exceptions properly! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]