public SAXParseException getException(XMLPipelineContext context) {
SAXParseException exception = null;
if (exceptions.size() != 0) {
Throwable[] throwables = new Throwable[exceptions.size()];
exceptions.toArray(throwables);
exception = new CompositeXMLPipelineException(ERROR_MSG,
context.getCurrentLocator(), throwables);
}
return exception;
}