stevedlawrence commented on a change in pull request #326: Daffodil 2280
cleanup - removes backpointers and factory patterns no longer needed
URL: https://github.com/apache/incubator-daffodil/pull/326#discussion_r393706336
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DataProcessor.scala
##########
@@ -175,7 +177,23 @@ class DataProcessor(
def save(output: DFDL.Output): Unit = {
val oos = new ObjectOutputStream(new
GZIPOutputStream(Channels.newOutputStream(output)))
- oos.writeObject(new SerializableDataProcessor(ssrd, tunablesObj))
+ val sdp = new SerializableDataProcessor(ssrd, tunablesObj)
+ try {
+ //
+ // The serialization system encapsulates exceptions or any throw really
+ // inside an IOException.
+ //
+ // We catch and undo this, and throw the original exception,
+ // which won't give us a breakpoint at the right place, but at least
+ // it will give us the right exception, and if it is an SDE, a backtrace.
+ //
Review comment:
Does this comment mean that we could throw an SDE during serialization? Is
this because of lazy evaluation? Doesn't the preserializations stuff prevent
this?
Does this also mean that it's possible that an SDE that happens at compile
time might not be checked and thrown until runtime?
----------------------------------------------------------------
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