Mercurial > cpython-lru_cache-weakref
diff Python/exceptions.c @ 19433:5d81c6bff306 legacy-trunk
Introduce OverflowWarning -- to be issued when short int operations
are overflowing and a long int operation is substituted.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 23 Aug 2001 02:56:07 +0000 |
| parents | 09df3254b49d |
| children | 8b3ea7335c1b |
line wrap: on
line diff
--- a/Python/exceptions.c Wed Aug 22 22:18:31 2001 +0000 +++ b/Python/exceptions.c Thu Aug 23 02:56:07 2001 +0000 @@ -105,6 +105,7 @@ +-- UserWarning\n\ +-- DeprecationWarning\n\ +-- SyntaxWarning\n\ + +-- OverflowWarning\n\ +-- RuntimeWarning"; @@ -912,6 +913,9 @@ SyntaxWarning__doc__[] = "Base class for warnings about dubious syntax."; static char +OverflowWarning__doc__[] = "Base class for warnings about numeric overflow."; + +static char RuntimeWarning__doc__[] = "Base class for warnings about dubious runtime behavior."; @@ -973,6 +977,7 @@ PyObject *PyExc_UserWarning; PyObject *PyExc_DeprecationWarning; PyObject *PyExc_SyntaxWarning; +PyObject *PyExc_OverflowWarning; PyObject *PyExc_RuntimeWarning; @@ -1047,6 +1052,8 @@ {"DeprecationWarning", &PyExc_DeprecationWarning, &PyExc_Warning, DeprecationWarning__doc__}, {"SyntaxWarning", &PyExc_SyntaxWarning, &PyExc_Warning, SyntaxWarning__doc__}, + {"OverflowWarning", &PyExc_OverflowWarning, &PyExc_Warning, + OverflowWarning__doc__}, {"RuntimeWarning", &PyExc_RuntimeWarning, &PyExc_Warning, RuntimeWarning__doc__}, /* Sentinel */
