Function: error

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

Signature

(error STRING &rest ARGS)

Documentation

Signal an error, making a message by passing ARGS to format-message.

Errors cause entry to the debugger 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 (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 1.2.

Aliases

tpu-error

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
;; Signal a compile-error if the first arg is missing.
(defun error (&rest args)
  "Signal an error, making a message by passing ARGS to `format-message'.
Errors cause entry to the debugger 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 (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."
  (declare (advertised-calling-convention (string &rest args) "23.1"))
  (signal 'error (list (apply #'format-message args))))