File: _exceptions.py

package info (click to toggle)
python-executing 2.2.0-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,860 kB
  • sloc: python: 10,235; sh: 48; makefile: 10
file content (22 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

class KnownIssue(Exception):
    """
    Raised in case of an known problem. Mostly because of cpython bugs.
    Executing.node gets set to None in this case.
    """

    pass


class VerifierFailure(Exception):
    """
    Thrown for an unexpected mapping from instruction to ast node
    Executing.node gets set to None in this case.
    """

    def __init__(self, title, node, instruction):
        # type: (object, object, object) -> None
        self.node = node
        self.instruction = instruction

        super().__init__(title) # type: ignore[call-arg]