Function: tramp-user-error

tramp-user-error is a byte-compiled function defined in tramp-message.el.gz.

Signature

(tramp-user-error VEC-OR-PROC FMT-STRING &rest ARGUMENTS)

Documentation

Signal a user error (or "pilot error").

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-message.el.gz
(defsubst tramp-user-error (vec-or-proc fmt-string &rest arguments)
  "Signal a user error (or \"pilot error\")."
  (declare (tramp-suppress-trace t))
  (unwind-protect
      (apply #'tramp-error vec-or-proc 'user-error fmt-string arguments)
    ;; Save exit.
    (when (and (natnump tramp-error-show-message-timeout)
	       (not (zerop tramp-verbose))
	       ;; Do not show when flagged from outside.
	       (not non-essential)
	       ;; Show only when Emacs has started already.
	       (current-message))
      (let ((enable-recursive-minibuffers t)
	    inhibit-message)
	;; `tramp-error' does not show messages.  So we must do it ourselves.
	(apply #'message fmt-string arguments)
	(discard-input)
	(sit-for tramp-error-show-message-timeout 'nodisp)
	;; Reset timestamp.  It would be wrong after waiting for a while.
	(when
	    (tramp-file-name-equal-p vec-or-proc (car tramp-current-connection))
	  (setcdr tramp-current-connection (current-time)))))))