This is an automated email from the ASF dual-hosted git repository.

davin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git


The following commit(s) were added to refs/heads/main by this push:
     new 214e7ab  Squashed into one commit
214e7ab is described below

commit 214e7ab7af82a090f84acd96363315840b7ba663
Author: naga-panchumarty <[email protected]>
AuthorDate: Tue Jan 20 17:04:20 2026 -0500

    Squashed into one commit
    
    DFDL-1513: Fixed long error message
    
    Fixed formatting issues
    
    Formatted the scala file using metals
---
 .../org.apache.daffodil.debugger.dap/Parse.scala   | 28 +++++++++++++---------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git 
a/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala 
b/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
index 893a960..1759ec2 100644
--- a/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
+++ b/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
@@ -106,17 +106,23 @@ object Parse {
                 // WARNING: parse doesn't close the OutputStream, so closed 
below
               ).flatTap { res =>
                 if (res.isError()) {
-                  dapEvents
-                    .send(
-                      Parse.Event.Error(
-                        Support
-                          .parseDiagnosticList(res.getDiagnostics)
-                          .toList
-                          .map(d => d.toString)
-                          .mkString("\n")
-                      )
-                    )
-                    .void
+                  val fullMessage =
+                    Support
+                      .parseDiagnosticList(res.getDiagnostics)
+                      .toList
+                      .map(_.toString)
+                      .mkString("\n")
+
+                  // Truncate for popup only
+                  val popupMessage =
+                    if (fullMessage.length <= 200) fullMessage
+                    else
+                      fullMessage.take(200) + " \nTo see all the errors, 
please look at the daffodil-debugger.log file"
+
+                  // Send short message to popup
+                  dapEvents.send(Parse.Event.Error(popupMessage)).void *>
+                    // Keep full message in log
+                    Logger[IO].error(fullMessage)
                 } else IO.unit
               }.ensureOr { res =>
                 new 
Parse.Exception(Support.parseDiagnosticList(res.getDiagnostics).toList)

Reply via email to