KOS_OP_EXCEPTION_MATCH
Style: NOARG.
Stack: Pop TOS (exception type or tuple of types). Push True if current exception matches that value, else False.
Invariants: Used in handler. Compiler typically emits BUILD_ARGS before this to pack multiple types into one tuple.
Example: Match current exception against one type; push True/False.
index |
opcode |
arg |
arg view |
comment |
|---|---|---|---|---|
2 |
CONST |
0 |
0 (ValueError) |
stack: […, typ] |
3 |
EXCEPTION_MATCH |
0 |
0 |
stack: […, result] |
4 |
JUMP_FALSE |
7 |
7 (-> 7) |
if no match, next handler |