diff options
| author | 2024-02-28 11:37:54 +0800 | |
|---|---|---|
| committer | 2024-02-28 11:37:54 +0800 | |
| commit | 672e0d03d3ffdba740d166f2c4a7243f142cec5f (patch) | |
| tree | 46cdb4ea015877e7828710a47c945aa2e834beb0 /nivis-python/exception.py | |
| parent | fc6fc64ca3ff7df62dd270fc021f674e56b2dedf (diff) | |
| download | TRPGNivis-672e0d03d3ffdba740d166f2c4a7243f142cec5f.tar.gz TRPGNivis-672e0d03d3ffdba740d166f2c4a7243f142cec5f.zip | |
refactor!: built in rust
Diffstat (limited to 'nivis-python/exception.py')
| -rw-r--r-- | nivis-python/exception.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nivis-python/exception.py b/nivis-python/exception.py new file mode 100644 index 0000000..0ec22e5 --- /dev/null +++ b/nivis-python/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.") + ``` + """ |
