aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nivis/exception.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-02-25 12:00:16 +0800
committer简律纯 <i@jyunko.cn>2024-02-25 12:00:16 +0800
commite2c1c1911e117245551a612499d02eacabbbe5d8 (patch)
tree91c98463bdc1397667ae8d13acb56d83ff347c6e /nivis/exception.py
parent1199a75378efcaf756e2027ecc2530c6d97bc95c (diff)
downloadTRPGNivis-e2c1c1911e117245551a612499d02eacabbbe5d8.tar.gz
TRPGNivis-e2c1c1911e117245551a612499d02eacabbbe5d8.zip
refactor: rename nivis-python to nivis
Diffstat (limited to 'nivis/exception.py')
-rw-r--r--nivis/exception.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/nivis/exception.py b/nivis/exception.py
new file mode 100644
index 0000000..0ec22e5
--- /dev/null
+++ b/nivis/exception.py
@@ -0,0 +1,37 @@
+class PsiException(Exception):
+ """
+ An exception class for Psi-specific exceptions.
+
+ This class inherits from the built-in `Exception` class.
+
+ Example:
+ ```python
+ raise PsiException("An error occurred in the Psi code.")
+ ```
+ """
+
+
+class ValueError(PsiException):
+ """
+ An exception class for value-related errors in Psi code.
+
+ This class inherits from the `PsiException` class.
+
+ Example:
+ ```python
+ 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.")
+ ```
+ """