Exceptions
exceptions
Custom xDSL exceptions.
This module contains all custom exceptions used by xDSL.
UnregisteredConstructException
Bases: Exception
An exception raised when a dialect, operation, type, or attribute is not registered.
Source code in xdsl/utils/exceptions.py
18 19 20 21 22 | |
AlreadyRegisteredConstructException
Bases: Exception
An exception raised when a dialect, operation, type, or attribute is registered twice.
Source code in xdsl/utils/exceptions.py
25 26 27 28 29 | |
DiagnosticException
Bases: Exception
Source code in xdsl/utils/exceptions.py
32 33 | |
VerifyException
Bases: DiagnosticException
Source code in xdsl/utils/exceptions.py
36 37 | |
PassFailedException
Bases: DiagnosticException
A diagnostic error which can be raised during the execution of a pass, used to signify that the pass did not succeed.
Source code in xdsl/utils/exceptions.py
40 41 42 43 44 45 46 | |
PyRDLError
Bases: Exception
An error in our IRDL eDSL.
Source code in xdsl/utils/exceptions.py
49 50 51 52 | |
PyRDLOpDefinitionError
Bases: PyRDLError
An error in the Operation definition eDSL.
Source code in xdsl/utils/exceptions.py
55 56 57 58 | |
PyRDLAttrDefinitionError
Bases: PyRDLError
An error in the Attribute definition eDSL.
Source code in xdsl/utils/exceptions.py
61 62 63 64 | |
PyRDLTypeError
Bases: TypeError, PyRDLError
A type error in our IRDL eDSL.
Source code in xdsl/utils/exceptions.py
67 68 69 70 | |
InvalidIRException
Bases: Exception
Source code in xdsl/utils/exceptions.py
73 74 | |
ShrinkException
Bases: Exception
Exception for test case reduction when used in conjunction with the Shrink Ray reducer.
To find a reduced version of a test case, raise this exception on the line of code you want to hit,
and pass the --shrink argument to xdsl-opt, by changing its invocation from:
xdsl-opt input_file.mlir -p my,pass,pipeline
to:
shrinkray "xdsl-opt -p my,pass,pipeline --shrink" input_file.mlir.
Source code in xdsl/utils/exceptions.py
77 78 79 80 81 82 83 84 85 86 87 88 89 | |
InterpretationError
Bases: Exception
An error that can be raised during interpretation, or Interpreter setup.
Source code in xdsl/utils/exceptions.py
92 93 94 95 96 97 | |
BuilderNotFoundException
dataclass
Bases: Exception
Exception raised when no builders are found for a given attribute type and a given tuple of arguments.
Source code in xdsl/utils/exceptions.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
attribute: type[Attribute]
instance-attribute
args: tuple[Any, ...]
instance-attribute
__init__(attribute: type[Attribute], args: tuple[Any, ...]) -> None
__str__() -> str
Source code in xdsl/utils/exceptions.py
110 111 112 113 114 | |
ParseError
dataclass
Bases: Exception
Source code in xdsl/utils/exceptions.py
117 118 119 120 121 122 123 | |
span: Span
instance-attribute
msg: str
instance-attribute
__init__(span: Span, msg: str) -> None
__str__() -> str
Source code in xdsl/utils/exceptions.py
122 123 | |
MultipleSpansParseError
dataclass
Bases: ParseError
Source code in xdsl/utils/exceptions.py
126 127 128 129 130 131 132 133 134 135 136 137 | |
ref_text: str | None
instance-attribute
refs: list[tuple[Span, str | None]]
instance-attribute
__init__(span: Span, msg: str, ref_text: str | None, refs: list[tuple[Span, str | None]]) -> None
__str__() -> str
Source code in xdsl/utils/exceptions.py
131 132 133 134 135 136 137 | |
PassPipelineParseError
Bases: BaseException
Source code in xdsl/utils/exceptions.py
140 141 142 143 144 145 | |
__init__(token: SpecToken, msg: str)
Source code in xdsl/utils/exceptions.py
141 142 143 144 145 | |
LLVMTranslationException
Bases: Exception
Exception raised during LLVM translation.
Source code in xdsl/utils/exceptions.py
148 149 150 151 152 153 | |