tuxji commented on code in PR #829:
URL: https://github.com/apache/daffodil/pull/829#discussion_r947963053


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/infoset/TeeInfosetOutputter.scala:
##########
@@ -19,11 +19,9 @@ package org.apache.daffodil.infoset
 
 
 /**
- * Receive infoset events and forward them to one or more InfosetOutputters.
- * For infoset events that return a boolean, this returns true only if all
- * outputters return true, otherwise false is returned. Additionally, all
- * events are called on all the outputters regardless of the return of any
- * previous outputters.
+ * Receive infoset events and forward them to one or more InfosetOutputters. A
+ * thrown exception from one outputters is not caught and bubbles up, and no

Review Comment:
   "one outputters" might read better as "any outputter"



##########
daffodil-japi/src/main/scala/org/apache/daffodil/japi/infoset/Infoset.scala:
##########
@@ -123,85 +123,85 @@ abstract class InfosetOutputter extends SInfosetOutputter 
{
   /**
    * Called by Daffodil internals to signify the beginning of the infoset.
    *
-   * @return true on sucess, false if there was an error and Daffodil should 
stop all
-   *         future calls to the InfosetOutputter
+   * @throws Exception if there was an error and Daffodil should stop parsing
    */
-  def startDocument(): Boolean
+  @throws[Exception]

Review Comment:
   I'm not sure why these javadoc errors are happening (java.lang.Exception 
should be built-in), but DAFFODIL-2721 says we may want to create specific 
exception(s) that both the inputter and outputter should be expected to throw 
when errors happen.  I think if you create such exception(s) (their names could 
be InfosetException or InfosetInputterException/InfosetOutputterException, take 
your choice), the javadoc errors would go away.  I also wonder if the specific 
exception should be a checked exception or inherit from RuntimeException (less 
code would be needed in the latter case).
   
   



-- 
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