Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
keep old type error at initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Apr 11, 2022
1 parent 1b18639 commit ebe930a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/geometry/polyhedron/backend_ppl.py
Expand Up @@ -189,13 +189,13 @@ def set_immutable(self):
sage: smaller_cube_ZZ.set_immutable()
Traceback (most recent call last):
...
TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``
TypeError: no conversion of this rational to integer
sage: smaller_cube_ZZ.is_immutable()
False
sage: smaller_cube_ZZ.set_immutable()
Traceback (most recent call last):
...
TypeError: the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``
TypeError: no conversion of this rational to integer
sage: smaller_cube_ZZ.is_immutable()
False
sage: smaller_cube_QQ = smaller_cube_ZZ.base_extend(QQ)
Expand All @@ -206,10 +206,10 @@ def set_immutable(self):
if not hasattr(self, '_Vrepresentation'):
try:
self._init_Vrepresentation_from_ppl(True)
except TypeError:
except TypeError as e:
# Apparently the polyhedron is (no longer) integral.
self._clear_cache()
raise TypeError("the polyhedron is not integral; do a base extension ``self.base_extend(QQ)``")
raise e
if not hasattr(self, '_Hrepresentation'):
self._init_Hrepresentation_from_ppl(True)
self._is_mutable = False
Expand Down

0 comments on commit ebe930a

Please sign in to comment.