mbeckerle commented on code in PR #663:
URL: https://github.com/apache/daffodil-vscode/pull/663#discussion_r1231375742


##########
server/core/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala:
##########
@@ -97,12 +100,22 @@ object Parse {
 
             val parse =
               IO.interruptibleMany {
-                dp.parse(
+                val parse_res = dp.parse(
                   new InputSourceDataInputStream(data),
                   infosetOutputter
-                ) // WARNING: parse doesn't close the OutputStream, so closed 
below
-              }.guaranteeCase(outcome => Logger[IO].debug(s"parse finished: 
$outcome"))
-                .void
+                )
+
+                parse_res.isError match {
+                  case true =>
+                    throw new Error(
+                      parse_res.getDiagnostics
+                        .map(d => d.toString)
+                        .mkString

Review Comment:
   Do you have an option to mkstring for putting a "\n" between the diagnostic 
messages? 
   Alternatively your d => d.toString can append a "\n" to the end of the 
string. 



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