Function: tramp-error

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

Signature

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

Documentation

Emit an error.

VEC-OR-PROC identifies the connection to use, SIGNAL is the signal identifier to be raised, remaining arguments passed to tramp-message. Finally, signal SIGNAL is raised with FMT-STRING and ARGUMENTS.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-message.el.gz
(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments)
  "Emit an error.
VEC-OR-PROC identifies the connection to use, SIGNAL is the
signal identifier to be raised, remaining arguments passed to
`tramp-message'.  Finally, signal SIGNAL is raised with
FMT-STRING and ARGUMENTS."
  (declare (tramp-suppress-trace t))
  (let (signal-hook-function)
    (tramp-backtrace vec-or-proc)
    (unless arguments
      ;; FMT-STRING could be just a file name, as in
      ;; `file-already-exists' errors.  It could contain the ?\%
      ;; character, as in smb domain spec.
      (setq arguments (list fmt-string)
	    fmt-string "%s"))
    (tramp-message
     vec-or-proc 1 "%s"
     (error-message-string
      (list signal
	    (get signal 'error-message)
	    (apply #'format-message fmt-string arguments))))
    (signal signal (list (substring-no-properties
			  (apply #'format-message fmt-string arguments))))))