diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-11-14 14:41:58 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-11-14 14:41:58 +0100 |
commit | 8aba549263e2660b4ac4f1026b23fbc5caef8168 (patch) | |
tree | 5a51de84c45f1346c179d725194685d15008c8a6 /lisp | |
parent | 091a6126ac743382ee40795cfe24710c24bf4461 (diff) | |
download | emacs-8aba549263e2660b4ac4f1026b23fbc5caef8168.tar.gz emacs-8aba549263e2660b4ac4f1026b23fbc5caef8168.tar.bz2 emacs-8aba549263e2660b4ac4f1026b23fbc5caef8168.zip |
Improve Tramp error handling
* doc/misc/tramp.texi (Frequently Asked Questions): Add another
`remote-file-error'.
* lisp/net/tramp.el (tramp-find-foreign-file-name-handler):
Improve error handling.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/net/tramp.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 876bbb2c545..5fcf7f9b650 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2552,13 +2552,20 @@ Must be handled by the callers." (when (tramp-tramp-file-p filename) (let ((handler tramp-foreign-file-name-handler-alist) (vec (tramp-dissect-file-name filename)) - elt res) + elt func res) (while handler (setq elt (car handler) handler (cdr handler)) ;; Previously, this function was called with FILENAME, but now ;; it's called with the VEC. - (when (with-demoted-errors "Error: %S" (funcall (car elt) vec)) + (when (condition-case nil + (funcall (setq func (car elt)) vec) + (error + (setcar elt #'ignore) + (unless (member 'remote-file-error debug-ignored-errors) + (tramp-error + vec 'remote-file-error + "Not a valid Tramp file name function `%s'" func)))) (setq handler nil res (cdr elt)))) res))) |