I am wondering the semantic of the
error function. For
condition-case, the Elisp manual says:
The arguments after the protected form are handlers. Each handler lists one or more condition names (which are symbols) to specify which errors it will handle.
From its example:
(condition-case nil (delete-file filename) (error nil))
(error nil) is the condition which is a symbol in my understanding.
On the other hand, when we want to raise an error, we use the function
error as well. From the Elisp manual:
Function: error format-string &rest args
This function signals an error with an error message constructed by applying format-message (see Formatting Strings) to format-string and args.
(error "That is an error -- try something else")
The error function will create a message and signal the error. What I cannot understand is, what is the difference between this error signaling function, and the error symbol in the
(condition-case) above? If
(error) is a function used to signal an error, in the
(condition-case) above the
(error nil) should be eval-ed and raise an error with a nil message instead of catching an error?