aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/psi/exception.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/psi/exception.py b/src/psi/exception.py
index 838d72b..a8b7201 100644
--- a/src/psi/exception.py
+++ b/src/psi/exception.py
@@ -22,3 +22,15 @@ class ValueError(PsiException):
raise ValueError("Invalid value encountered in the Psi code.")
```
"""
+
+class GrammarError(PsiException):
+ """
+ An exception class for grammar-related errors in Psi code.
+
+ This class inherits from the `PsiException` class.
+
+ Example:
+ ```python
+ raise GrammarError("Invalid grammar encountered in the Psi code.")
+ ```
+ """