From e0a33d0f994609e6183fa90d0781636a39e84d04 Mon Sep 17 00:00:00 2001 From: Peter Tsrunchev Date: Wed, 18 Sep 2024 13:43:09 +0000 Subject: [PATCH] still key errors --- polytope/utility/exceptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/polytope/utility/exceptions.py b/polytope/utility/exceptions.py index 880b054e..b9b25e0f 100644 --- a/polytope/utility/exceptions.py +++ b/polytope/utility/exceptions.py @@ -2,7 +2,7 @@ class PolytopeError(Exception): pass -class AxisOverdefinedError(PolytopeError): +class AxisOverdefinedError(PolytopeError, KeyError): def __init__(self, axis): self.axis = axis self.message = ( @@ -11,19 +11,19 @@ def __init__(self, axis): ) -class AxisUnderdefinedError(PolytopeError): +class AxisUnderdefinedError(PolytopeError, KeyError): def __init__(self, axis): self.axis = axis self.message = f"Axis {axis} is underdefined. It does not appear in any input polytope." -class AxisNotFoundError(PolytopeError): +class AxisNotFoundError(PolytopeError, KeyError): def __init__(self, axis): self.axis = axis self.message = f"Axis {axis} does not exist in the datacube." -class UnsliceableShapeError(PolytopeError): +class UnsliceableShapeError(PolytopeError, KeyError): def __init__(self, axis): self.axis = axis self.message = f"Higher-dimensional shape does not support unsliceable axis {axis.name}."