all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* an elint error message
@ 2009-11-24 23:09 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2009-11-24 23:09 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

I applied this to an elint error message.  I was a bit confused by
"Unable to find require'd library" until realizing it wanted the source,
where I only had the .elc.  I think I struck other errors from some of
my macro expansions or something which I can't reproduce any more, but
using error-message-string lets it show whatever went wrong.

You'd be tempted to make it a display-warning or in the elint report
buffer, instead of just a `message', so as not to lose it among other
chattering.  But that can be for another time ...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: elint.el.error-message.diff --]
[-- Type: text/x-diff, Size: 1070 bytes --]

Index: elint.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/elint.el,v
retrieving revision 1.34
diff -u -u -r1.34 elint.el
--- elint.el	14 Nov 2009 19:57:12 -0000	1.34
+++ elint.el	24 Nov 2009 23:06:06 -0000
@@ -493,7 +493,7 @@
 
 (defun elint-add-required-env (env name file)
   "Augment ENV with the variables defined by feature NAME in FILE."
-  (condition-case nil
+  (condition-case err
       (let* ((libname (if (stringp file)
 			  file
 			(symbol-name name)))
@@ -518,9 +518,10 @@
 	      ;;; 	  (elint-update-env))
 	      ;;; 	(setq env (elint-env-add-env env elint-buffer-env))))
 	      ;;(message "Elint processed (require '%s)" name))
-	  (error "Unable to find require'd library %s" name)))
+	  (error "%s.el not found in load-path" libname)))
     (error
-     (message "Can't get variables from require'd library %s" name)))
+     (message "Can't get variables from require'd library %s: %s"
+              name (error-message-string err))))
   env)
 
 (defvar elint-top-form nil

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-24 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-24 23:09 an elint error message Kevin Ryde

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.