emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dape 42eb73fd7e 4/7: Improve debug printouts on init fa


From: ELPA Syncer
Subject: [elpa] externals/dape 42eb73fd7e 4/7: Improve debug printouts on init failure
Date: Mon, 15 Jan 2024 18:58:02 -0500 (EST)

branch: externals/dape
commit 42eb73fd7e9895afcb9cbbc76221bd7d5b0a7a64
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>

    Improve debug printouts on init failure
---
 dape.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dape.el b/dape.el
index 6b164f501c..7efe1900a0 100644
--- a/dape.el
+++ b/dape.el
@@ -1053,7 +1053,7 @@ and success.  See `dape--callback' for signature."
                            (lambda ()
                              (dape--repl-message
                               (format "* Command %s timeout *" command) 'error)
-                             (funcall cb conn nil "Timed out")))))
+                             (funcall cb conn nil "timeout")))))
 
 (defun dape--initialize (conn)
   "Initialize and launch/attach adapter CONN."
@@ -1079,7 +1079,9 @@ and success.  See `dape--callback' for signature."
                                   ))
     (if error-message
         (progn
-          (dape--repl-message error-message 'dape-repl-exit-code-fail)
+          (dape--repl-message (format "Initialize failed due to: %s"
+                                      error-message)
+                              'dape-repl-exit-code-fail)
           (dape-kill conn))
       (setf (dape--capabilities conn) body)
       (dape--with dape-request
@@ -1690,14 +1692,13 @@ symbol `dape-connection'."
                    (lambda (conn)
                      ;; error prints
                      (unless (dape--initialized-p conn)
-                       (dape--repl-message "Connection ended without 
successfully initializing"
+                       (dape--repl-message "Adapter connection shutdown 
without successfully initializing"
                                            'error)
                        ; barf config
                        (dape--repl-message
-                        (format "With adapter request:\n%s"
+                        (format "Configuration:\n%s"
                                 (cl-loop for (key value) on (dape--config 
conn) by 'cddr
-                                         when (keywordp key)
-                                         concat (format "%s %S\n" key value)))
+                                         concat (format "  %s %S\n" key 
value)))
                         'error)
                        ;; barf connection stderr
                        (when-let* ((proc (jsonrpc--process conn))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]