summaryrefslogtreecommitdiff
path: root/devdocs/elisp/errors.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/errors.html
new repository
Diffstat (limited to 'devdocs/elisp/errors.html')
-rw-r--r--devdocs/elisp/errors.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/devdocs/elisp/errors.html b/devdocs/elisp/errors.html
new file mode 100644
index 00000000..c6c1268f
--- /dev/null
+++ b/devdocs/elisp/errors.html
@@ -0,0 +1,26 @@
+ <h4 class="subsection">Errors</h4> <p>When Emacs Lisp attempts to evaluate a form that, for some reason, cannot be evaluated, it <em>signals</em> an <em>error</em>. </p> <p>When an error is signaled, Emacs’s default reaction is to print an error message and terminate execution of the current command. This is the right thing to do in most cases, such as if you type <kbd>C-f</kbd> at the end of the buffer. </p> <p>In complicated programs, simple termination may not be what you want. For example, the program may have made temporary changes in data structures, or created temporary buffers that should be deleted before the program is finished. In such cases, you would use <code>unwind-protect</code> to establish <em>cleanup expressions</em> to be evaluated in case of error. (See <a href="cleanups">Cleanups</a>.) Occasionally, you may wish the program to continue execution despite an error in a subroutine. In these cases, you would use <code>condition-case</code> to establish <em>error handlers</em> to recover control in case of error. </p> <p>Resist the temptation to use error handling to transfer control from one part of the program to another; use <code>catch</code> and <code>throw</code> instead. See <a href="catch-and-throw">Catch and Throw</a>. </p> <table class="menu" border="0" cellspacing="0"> <tr>
+<td align="left" valign="top">• <a href="signaling-errors" accesskey="1">Signaling Errors</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to report an error. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="processing-of-errors" accesskey="2">Processing of Errors</a>
+</td>
+<td> </td>
+<td align="left" valign="top">What Emacs does when you report an error. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="handling-errors" accesskey="3">Handling Errors</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How you can trap errors and continue execution. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="error-symbols" accesskey="4">Error Symbols</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How errors are classified for trapping them. </td>
+</tr> </table><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Errors.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Errors.html</a>
+ </p>
+</div>