bsloane1650 commented on a change in pull request #223: Daffodil 1444 schema
comp simple types
URL: https://github.com/apache/incubator-daffodil/pull/223#discussion_r289621264
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/DFDLSchemaFile.scala
##########
@@ -149,10 +154,11 @@ final class DFDLSchemaFile(val sset: SchemaSet,
ldr.validateSchema(schemaSource) // validate as XSD (catches UPA
errors for example)
} catch {
case _: org.xml.sax.SAXParseException =>
- // ok to absorb this. We have captured fatal exceptions in the
- // error handler.
- case e: Exception =>
- Assert.invariantFailed("Unexpected exception type " + e)
+ // BAD IDEA... was masking Null Pointer Exceptions
+ // ok to absorb this. We have captured fatal exceptions in the
Review comment:
I assume the "ok to absorb this" is meant to refer to catching the
SAXParseException.
If so, this comment should be re-worked to indicated that the bad idea is
the attempt to catch all exceptions, but catching SAXParseException is still
okay.
Do we know why we were trying to catch exceptions here in the first place?
Does removing it degrade our error handling in other cases?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services