shanedell commented on code in PR #663:
URL: https://github.com/apache/daffodil-vscode/pull/663#discussion_r1231376733
##########
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:
Yeah I believe I can do `.mkString("\n")`
--
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]