]> git.eshelyaron.com Git - emacs.git/commitdiff
Overflow errors are range errors
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Nov 2019 07:17:06 +0000 (23:17 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Nov 2019 07:39:55 +0000 (23:39 -0800)
* etc/NEWS: Mention this.
* doc/lispref/errors.texi (Standard Errors):
Document overflow-error, which was formerly undocumented.
It is a range error, not a domain error.
* src/data.c (syms_of_data): overflow-error and (undocumented)
underflow-error are subtypes range-error, not domain-error.
This fixes bugs in timezone-time-from-absolute and in
erc-ctcp-reply-PING.

doc/lispref/errors.texi
etc/NEWS
src/data.c

index cf9b67c80d8d00bd338e7b82d187c2006f9fb0aa..dc9089ad1e34da1fc230c3098ade5848c6fd211b 100644 (file)
@@ -163,6 +163,10 @@ The message is @samp{Attempt to modify a protected file}.
 
 @item range-error
 The message is @code{Arithmetic range error}.
+
+@item overflow-error
+The message is @samp{Arithmetic overflow error}.  This is a subcategory
+of @code{range-error}.
 This can happen with integers exceeding the @code{integer-width} limit.
 @xref{Integer Basics}.
 
@@ -229,10 +233,6 @@ mathematical functions.  @xref{Math Functions}.
 @item domain-error
 The message is @samp{Arithmetic domain error}.
 
-@item overflow-error
-The message is @samp{Arithmetic overflow error}.  This is a subcategory
-of @code{domain-error}.
-
 @item singularity-error
 The message is @samp{Arithmetic singularity error}.  This is a
 subcategory of @code{domain-error}.
index e897fe06c99f7b15192121f284d9ab91ac347319..7ff9df6e0fa2c49506b77a505f2ca05ed33745cb 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2617,6 +2617,11 @@ like 'file-attributes' that compute file sizes and other attributes,
 functions like 'process-id' that compute process IDs, and functions like
 'user-uid' and 'group-gid' that compute user and group IDs.
 
++++
+** overflow-error is now documented as a subcategory of range-error.
+Formerly it was undocumented, and was (incorrectly) a subcategory
+of domain-error.
+
 ** Time values
 
 +++
index a338dadfb69e5f365ab7ffbc648b27c656247b5d..d968ac9e3a97d23eddab4b8acf1f1ff434d14307 100644 (file)
@@ -3935,9 +3935,9 @@ syms_of_data (void)
   PUT_ERROR (Qsingularity_error, Fcons (Qdomain_error, arith_tail),
             "Arithmetic singularity error");
 
-  PUT_ERROR (Qoverflow_error, Fcons (Qdomain_error, arith_tail),
+  PUT_ERROR (Qoverflow_error, Fcons (Qrange_error, arith_tail),
             "Arithmetic overflow error");
-  PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail),
+  PUT_ERROR (Qunderflow_error, Fcons (Qrange_error, arith_tail),
             "Arithmetic underflow error");
 
   /* Types that type-of returns.  */