Exceptions
exceptions
AsymmetricMirrorRequiredError
Bases: ValueError
Raised when connecting two asymmetric ports without mirror=True.
Two ports carrying the same AsymmetricalCrossSection can only be
connected via an M90 (mirror) transformation, since R180 would flip the
left/right halves of the profile. Pass mirror=True to connect.
Source code in kfactory/exceptions.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
CellNameError
Bases: ValueError
Raised if a KCell is created and the automatic assigned name is taken.
Source code in kfactory/exceptions.py
203 204 | |
CrossSectionNamingConflictError
Bases: ValueError
Raised when a second name is registered for an existing structural signature.
Cross sections and enclosures are canonicalized by their name-independent structural signature. A given signature may have at most one named canonical entry; attempting to register a second, differently-named entry for the same signature (or to reuse a name for a different signature) raises this error.
Source code in kfactory/exceptions.py
49 50 51 52 53 54 55 56 | |
CrossSectionSymmetryMismatchError
Bases: ValueError
Raised when connecting ports whose cross sections differ in symmetry.
A symmetric and an asymmetric cross section cannot be connected even with
allow_width_mismatch, since they are structurally different objects.
Source code in kfactory/exceptions.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
DuplicateCellNameError
Bases: RuntimeError
Raised when writing a layout with multiple cells sharing the same name.
GDS/OASIS formats require unique cell names. This error provides details about which names are duplicated and which cells are involved.
Source code in kfactory/exceptions.py
207 208 209 210 211 212 | |
FactoriesLockedError
Bases: RuntimeError
Raised when trying to add a factory to a locked Factories collection.
Source code in kfactory/exceptions.py
41 42 | |
InvalidLayerError
Bases: ValueError
Raised when a layer is not valid.
Source code in kfactory/exceptions.py
215 216 | |
LockedError
Bases: AttributeError
Raised when a locked cell is being modified.
Source code in kfactory/exceptions.py
28 29 30 31 32 33 34 35 36 37 38 | |
__init__
__init__(kcell: AnyKCell | BaseKCell) -> None
Throw _locked error.
Source code in kfactory/exceptions.py
31 32 33 34 35 36 37 38 | |
MergeError
Bases: ValueError
Raised if two layout's have conflicting cell definitions.
Source code in kfactory/exceptions.py
45 46 | |
PortLayerMismatchError
Bases: ValueError
Error thrown when two ports don't have a matching layer.
Source code in kfactory/exceptions.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
__init__
__init__(
kcl: KCLayout,
inst: ProtoInstance[Any] | ProtoInstanceGroup[Any, Any],
other_inst: ProtoInstance[Any]
| ProtoInstanceGroup[Any, Any]
| ProtoPort[Any],
p1: ProtoPort[Any],
p2: ProtoPort[Any],
*args: Any,
) -> None
Throw error for the two ports p1/p1.
Source code in kfactory/exceptions.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
PortTypeMismatchError
Bases: ValueError
Error thrown when two ports don't have a matching port_type.
Source code in kfactory/exceptions.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
__init__
__init__(
inst: ProtoInstance[Any] | ProtoInstanceGroup[Any, Any],
other_inst: ProtoInstance[Any]
| ProtoInstanceGroup[Any, Any]
| ProtoPort[Any],
p1: ProtoPort[Any],
p2: ProtoPort[Any],
*args: Any,
) -> None
Throw error for the two ports p1/p1.
Source code in kfactory/exceptions.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
PortWidthMismatchError
Bases: ValueError
Error thrown when two ports don't have a matching width.
Source code in kfactory/exceptions.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
__init__
__init__(
inst: ProtoInstance[Any] | ProtoInstanceGroup[Any, Any],
other_inst: ProtoInstance[Any]
| ProtoInstanceGroup[Any, Any]
| ProtoPort[Any],
p1: ProtoPort[Any],
p2: ProtoPort[Any],
*args: Any,
) -> None
Throw error for the two ports p1/p1.
Source code in kfactory/exceptions.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |