/** * Collect an error reported by an underlying process such as a parser or a transformer without * throwing any exception. * * @param level The level of the exception. * @param exception The exception thrown by the underlying process. * * @throws NullPointerException If either argument is <code>null</code>. */ public final void collectQuietly(Level level, T exception) { this._collected.add(new CollectedError<>(level, exception)); if (this.flag.compareTo(level) <= 0) { this._hasError = true; } }
ErrorCollector<? extends Throwable> collector = ((CompoundBerliozException)throwable).getCollector(); for (CollectedError<? extends Throwable> collected : collector.getErrors()) { collected.toXML(xml);
xml.openElement("collected-errors"); for (CollectedError<TransformerException> item : collector.getErrors()) { item.toXML(xml);
ErrorCollector<? extends Throwable> collector = ((CompoundBerliozException)exception).getCollector(); for (CollectedError<? extends Throwable> collected : collector.getErrors()) { collected.toXML(xml);
/** * Collect an error reported by an underlying process such as a parser or a transformer. * * <p>Note: this method should generally be called at the end of a function at it can throw an exception if * the threshold was reached. * * @param level The level of the exception. * @param exception The exception thrown by the underlying process. * * @throws T If the exception threshold has been reached, the exception passed as argument is thrown. * @throws NullPointerException If either argument is <code>null</code>. */ public final void collect(Level level, T exception) throws T { this._collected.add(new CollectedError<>(level, exception)); if (this.flag.compareTo(level) <= 0) { this._hasError = true; } if (this.exception.compareTo(level) <= 0) throw exception; }