mbeckerle commented on a change in pull request #216: Do not abort when an
import/includes fails
URL: https://github.com/apache/incubator-daffodil/pull/216#discussion_r282920645
##########
File path:
daffodil-lib/src/main/scala/org/apache/daffodil/xml/DaffodilXMLLoader.scala
##########
@@ -237,12 +237,7 @@ class DFDLCatalogResolver private ()
optURI match {
case None => null
case Some(uri) => {
- val resourceAsStream =
- try {
- uri.toURL.openStream() // This will work.
- } catch {
- case _: java.io.IOException => Assert.invariantFailed("found
resource but couldn't open")
- }
+ val resourceAsStream = uri.toURL.openStream()
Review comment:
You are in daffodil-lib code, which defines the ThrowsSDE stuff. You should
be able to actually report an SDE from this if resourceAsStream comes back
null, or catch the IOException, and nest whatever the I/O exception was as the
SDE cause. Perhaps that happens at a high level of catch structure?
The key is that this cause here gets captured.
----------------------------------------------------------------
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