aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nivis-python/exception.py
blob: 0ec22e54f710e845481b97fc49e615f85d650804 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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.")
        ```
    """