shanedell commented on code in PR #666:
URL: https://github.com/apache/daffodil-vscode/pull/666#discussion_r1232612467


##########
server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala:
##########
@@ -67,9 +65,9 @@ object DAPSession {
       def sendEvent(event: DebugEvent): IO[Unit] =
         Logger[IO].info(show"<E $event") *> 
IO.blocking(server.sendEvent(event))
 
-      def terminate(message: String): IO[Unit] =
-        sendEvent(new ErrorEvent(s"${message}. check debugger output for more 
information.")) *>
-          sendEvent(new Events.TerminatedEvent())
+      /** Send DebugEvent back to extension and exit session, ending debug */
+      def abort(event: DebugEvent): IO[Unit] =

Review Comment:
   yeah that is correct. they all caused the program to stop. I will remove the 
message param from all ErrorEvents, that makes a look of sense. I will make 
case objects instead of case classes as well. 



##########
server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala:
##########
@@ -247,7 +247,7 @@ class DAPodil(
             )
           )
         }
-      case _ => session.terminate("failed to load sources")
+      case _ => session.abort(new ErrorEvents.SourceError("failed to load 
sources"))

Review Comment:
   I will remove the message param from all ErrorEvents, that makes a look of 
sense. I will make case objects instead of case classes as well.



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