Function: user-error
user-error is a byte-compiled function defined in subr.el.gz.
Signature
(user-error FORMAT &rest ARGS)
Documentation
Signal a user error, making a message by passing ARGS to format-message.
This is like error except that a user error (or "pilot error") comes
from an incorrect manipulation by the user, not from an actual problem.
In contrast with other errors, user errors normally do not cause
entry to the debugger, even when debug-on-error is non-nil.
This can be overridden by debug-ignored-errors.
To signal with MESSAGE without interpreting format characters
like %, ``' and \=', use (user-error "%s" MESSAGE).
In Emacs, the convention is that error messages start with a capital
letter but *do not* end with a period. Please follow this convention
for the sake of consistency.
Probably introduced at or before Emacs version 24.3.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun user-error (format &rest args)
"Signal a user error, making a message by passing ARGS to `format-message'.
This is like `error' except that a user error (or \"pilot error\") comes
from an incorrect manipulation by the user, not from an actual problem.
In contrast with other errors, user errors normally do not cause
entry to the debugger, even when `debug-on-error' is non-nil.
This can be overridden by `debug-ignored-errors'.
To signal with MESSAGE without interpreting format characters
like `%', `\\=`' and `\\='', use (user-error \"%s\" MESSAGE).
In Emacs, the convention is that error messages start with a capital
letter but *do not* end with a period. Please follow this convention
for the sake of consistency."
(signal 'user-error (list (apply #'format-message format args))))