Skip to content

Commit 7ee3e8f

Browse files
committed
feat: add InternalTypeError exception class
1 parent 638d5d4 commit 7ee3e8f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/api/exception.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# See https://www.gnu.org/licenses/agpl-3.0.html for details.
66
# --------------------------------------------------------------------
77

8+
from __future__ import annotations
9+
810
__all__ = [
911
"Error",
1012
"InternalError",
@@ -57,3 +59,10 @@ class TempAlreadyFreedError(InternalError):
5759
def __init__(self, label):
5860
super().__init__(f"Label '{label}' already freed")
5961
self.label = label
62+
63+
64+
class InvalidTypeError(InternalError):
65+
"""Raised when a type is invalid."""
66+
67+
def __init__(self, msg: str):
68+
super().__init__(msg)

0 commit comments

Comments
 (0)