changeset 106226:85863d02e2db

* emacs-lisp/elint.el (elint-add-required-env): Better error message when .el source file not found or other error.
author Kevin Ryde <user42@zip.com.au>
date Tue, 24 Nov 2009 23:07:23 +0000
parents 5418676a97db
children 25c332a2db29
files lisp/emacs-lisp/elint.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/elint.el	Tue Nov 24 22:28:01 2009 +0000
+++ b/lisp/emacs-lisp/elint.el	Tue Nov 24 23:07:23 2009 +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