From 4d184fb07f543d96c0a3a40480a0d8b86c472931 Mon Sep 17 00:00:00 2001 From: Nick Roberts <nickrob@snap.net.nz> Date: Sun, 20 Sep 2020 00:27:26 +0200 Subject: [PATCH] Make a gud error message more informative * lisp/progmodes/gud.el (gud-jdb-marker-filter): Make the error message more informative (bug#1282). --- lisp/progmodes/gud.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 092d15983e5..84c473ddb7e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2358,17 +2358,17 @@ during jdb initialization depending on the value of (if (< n gud-jdb-lowest-stack-level) (progn (setq gud-jdb-lowest-stack-level n) t))) t) - (if (setq file-found - (gud-jdb-find-source (match-string 2 gud-marker-acc))) - (setq gud-last-frame - (cons file-found - (string-to-number - (let - ((numstr (match-string 4 gud-marker-acc))) - (if (string-match "[.,]" numstr) - (replace-match "" nil nil numstr) - numstr))))) - (message "Could not find source file."))) + (let ((class (match-string 2 gud-marker-acc))) + (if (setq file-found (gud-jdb-find-source class)) + (setq gud-last-frame + (cons file-found + (string-to-number + (let + ((numstr (match-string 4 gud-marker-acc))) + (if (string-match "[.,]" numstr) + (replace-match "" nil nil numstr) + numstr))))) + (message "Could not find source file for %s" class)))) ;; Set the accumulator to the remaining text. (setq gud-marker-acc (substring gud-marker-acc (match-end 0)))) -- 2.39.5