stevedlawrence commented on code in PR #985:
URL: https://github.com/apache/daffodil/pull/985#discussion_r1132337698


##########
daffodil-test/src/test/scala/org/apache/daffodil/section00/general/TestDisallowDocType.scala:
##########
@@ -87,7 +86,7 @@ class TestDisallowDocType {
   }
 
   @Test def test_infosetFileMustNotHaveDocType(): Unit = {
-    val e = intercept[TDMLException] {
+    val e = intercept[SAXParseException] {

Review Comment:
   I wonder if the problem of the leaking exception is here:
   
   
https://github.com/apache/daffodil/blob/b1a5ab06c3bd194ecd43f37789654c89c83beb49/daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/DaffodilConstructingLoader.scala#L477
   
   When parsing fatalError will be called which throws an exception. That is 
likely caught in this catch block, but then calls fatalError which will throw 
that exception. Not only does this mean we'll see the exception twice, it means 
the exception leaks out. It probably also means the exception is duplicated in 
the diagnostics, unless the exception was thrown by scala-xml without calling 
fatalError.  
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to