diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-09 17:22:44 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-09 17:22:44 -0400 |
| commit | 54bd972f159fb8c25b4f4042ac6db5da557d9108 (patch) | |
| tree | 02debb972eec68ea4520474aca74d54843f0d708 /lisp/calc | |
| parent | 14ba08227d9272a34a0a95d20640f4bbdd0b6033 (diff) | |
| download | emacs-54bd972f159fb8c25b4f4042ac6db5da557d9108.tar.gz | |
* lisp/subr.el (define-error): New function.
* doc/lispref/control.texi (Signaling Errors): Refer to define-error.
(Error Symbols): Add `define-error'.
* doc/lispref/errors.texi (Standard Errors): Don't refer to `error-conditions'.
* lisp/progmodes/ada-xref.el (ada-error-file-not-found): Rename from
error-file-not-found and define with define-error.
* lisp/emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el
and define with define-error.
* lisp/userlock.el (file-locked, file-supersession):
* lisp/simple.el (mark-inactive):
* lisp/progmodes/js.el (js-moz-bad-rpc, js-js-error):
* lisp/progmodes/ada-mode.el (ada-mode-errors):
* lisp/play/life.el (life-extinct):
* lisp/nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error):
* lisp/nxml/xmltok.el (xmltok-markup-declaration-parse-error):
* lisp/nxml/rng-util.el (rng-error):
* lisp/nxml/rng-uri.el (rng-uri-error):
* lisp/nxml/rng-match.el (rng-compile-error):
* lisp/nxml/rng-cmpct.el (rng-c-incorrect-schema):
* lisp/nxml/nxml-util.el (nxml-error, nxml-file-parse-error):
* lisp/nxml/nxml-rap.el (nxml-scan-error):
* lisp/nxml/nxml-outln.el (nxml-outline-error):
* lisp/net/soap-client.el (soap-error):
* lisp/net/gnutls.el (gnutls-error):
* lisp/net/ange-ftp.el (ftp-error):
* lisp/mpc.el (mpc-proc-error):
* lisp/json.el (json-error, json-readtable-error, json-unknown-keyword)
(json-number-format, json-string-escape, json-string-format)
(json-key-format, json-object-format):
* lisp/jka-compr.el (compression-error):
* lisp/international/quail.el (quail-error):
* lisp/international/kkc.el (kkc-error):
* lisp/emacs-lisp/ert.el (ert-test-failed):
* lisp/calc/calc.el (calc-error, inexact-result, math-overflow)
(math-underflow):
* lisp/bookmark.el (bookmark-error-no-filename):
* lisp/epg.el (epg-error): Define with define-error.
Diffstat (limited to 'lisp/calc')
| -rw-r--r-- | lisp/calc/calc.el | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index e72d0aacd5d..2eeb880c34d 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -921,15 +921,12 @@ Used by `calc-user-invocation'.") (put 'calc-mode 'mode-class 'special) (put 'calc-trail-mode 'mode-class 'special) -;; Define "inexact-result" as an e-lisp error symbol. -(put 'inexact-result 'error-conditions '(error inexact-result calc-error)) -(put 'inexact-result 'error-message "Calc internal error (inexact-result)") - -;; Define "math-overflow" and "math-underflow" as e-lisp error symbols. -(put 'math-overflow 'error-conditions '(error math-overflow calc-error)) -(put 'math-overflow 'error-message "Floating-point overflow occurred") -(put 'math-underflow 'error-conditions '(error math-underflow calc-error)) -(put 'math-underflow 'error-message "Floating-point underflow occurred") +(define-error 'calc-error "Calc internal error") +(define-error 'inexact-result + "Calc internal error (inexact-result)" 'calc-error) + +(define-error 'math-overflow "Floating-point overflow occurred" 'calc-error) +(define-error 'math-underflow "Floating-point underflow occurred" 'calc-error) (defvar calc-trail-pointer nil "The \"current\" entry in trail buffer.") |
