@@ -302,28 +302,28 @@ public static Document convertStringToDocument(String xmlStr) throws ParserConfi
302302 try {
303303 // do not include external general entities
304304 docfactory .setAttribute ("http://xml.org/sax/features/external-general-entities" , Boolean .FALSE );
305- } catch (Exception e ) {}
305+ } catch (Throwable e ) {}
306306 try {
307307 // do not include external parameter entities or the external DTD subset
308308 docfactory .setAttribute ("http://xml.org/sax/features/external-parameter-entities" , Boolean .FALSE );
309- } catch (Exception e ) {}
309+ } catch (Throwable e ) {}
310310 try {
311311 docfactory .setAttribute ("http://apache.org/xml/features/disallow-doctype-decl" , Boolean .TRUE );
312- } catch (Exception e ) {}
312+ } catch (Throwable e ) {}
313313 try {
314314 docfactory .setAttribute ("http://javax.xml.XMLConstants/feature/secure-processing" , Boolean .TRUE );
315- } catch (Exception e ) {}
315+ } catch (Throwable e ) {}
316316 try {
317317 // ignore the external DTD completely
318318 docfactory .setAttribute ("http://apache.org/xml/features/nonvalidating/load-external-dtd" , Boolean .FALSE );
319- } catch (Exception e ) {}
319+ } catch (Throwable e ) {}
320320 try {
321321 // build the grammar but do not use the default attributes and attribute types information it contains
322322 docfactory .setAttribute ("http://apache.org/xml/features/nonvalidating/load-dtd-grammar" , Boolean .FALSE );
323- } catch (Exception e ) {}
323+ } catch (Throwable e ) {}
324324 try {
325325 docfactory .setFeature (XMLConstants .FEATURE_SECURE_PROCESSING , true );
326- } catch (Exception e ) {}
326+ } catch (Throwable e ) {}
327327
328328 DocumentBuilder builder = docfactory .newDocumentBuilder ();
329329 Document doc = builder .parse (new InputSource (new StringReader (xmlStr )));
0 commit comments