diff options
| author | Stefan Monnier | 2026-03-10 10:31:14 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2026-03-10 10:48:22 -0400 |
| commit | fa6f2cb63c887ab322f7146fd65b1642348f6718 (patch) | |
| tree | ebc60e0066df850d57c4dd7c269762f49745f147 /lisp/subr.el | |
| parent | 6d8b3d1077278b5c22652c796d3d878880cca1f3 (diff) | |
| download | emacs-scratch/error-API.tar.gz emacs-scratch/error-API.zip | |
(error-data): Delete functionscratch/error-API
Remove `error-data` from the new error API: it is not really
compatible with a more abstract view of error descriptors, and
in practice it seems to be used only in two ways (both of them rare):
- To add some contextual info to an error. We should maybe add
a dedicated support for that, but it's not clear what shape it
should take, ideally (there was a discussion about with Alan
and myself in emacs-devel a few years ago).
- To do some other massaging whose correctness is dubious anyway.
* doc/lispref/control.texi (Handling Errors): Remove `error-data`.
* lisp/epa-file.el (epa-file--find-file-not-found-function): Don't use
`error-data`.
(epa-file--error-add-context): New function, extracted from
`epa-file-insert-file-contents`.
(epa-file-insert-file-contents): Use it instead of `error-data`.
* lisp/subr.el (error-data): Delete function.
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 3cf4e8276d6..0c2acfec335 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -586,10 +586,6 @@ Defaults to `error'." | |||
| 586 | "Return the symbol which represents the type of ERROR. | 586 | "Return the symbol which represents the type of ERROR. |
| 587 | \n(fn ERROR)") | 587 | \n(fn ERROR)") |
| 588 | 588 | ||
| 589 | (defalias 'error-data #'cdr | ||
| 590 | "Return the slots attached to ERROR, as a list. | ||
| 591 | \n(fn ERROR)") | ||
| 592 | |||
| 593 | (defun error-has-type-p (error condition) | 589 | (defun error-has-type-p (error condition) |
| 594 | "Return non-nil if ERROR is of type CONDITION (or a subtype of it)." | 590 | "Return non-nil if ERROR is of type CONDITION (or a subtype of it)." |
| 595 | (unless (error--p error) | 591 | (unless (error--p error) |