Exception Generating and Handling
TVM Instructions Content List
- Overview
- Stack Manipulation
- Tuple, List and Null
- Constants and Literals
- Arithmetic Operations
- Data Comparison
- Cell Manipulation
- Continuation and Control Flow
- Exception Generation and Handling
- Dictionary Manipulation
- Application-specific Primitives
- Miscellaneous
Opcode | Fift syntax | Stack | Description | Gas |
---|---|---|---|---|
Please enter a search query | ||||
No results found |
Exception Generating and Handling
xxxxxxx Opcode | xxxxxxxxxxxxxxxxxxxxxxxxxxxx Fift syntax | xxxxxxxxxxxxxxxxx Stack | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Description | xxxx Gas |
---|---|---|---|---|
F22_n | [n] THROW | - 0 n | Throws exception 0 <= n <= 63 with parameter zero.In other words, it transfers control to the continuation in c2 , pushing 0 and n into its stack, and discarding the old stack altogether. | 76 |
F26_n | [n] THROWIF | f - | Throws exception 0 <= n <= 63 with parameter zero only if integer f!=0 . | 26/76 |
F2A_n | [n] THROWIFNOT | f - | Throws exception 0 <= n <= 63 with parameter zero only if integer f=0 . | 26/76 |
F2C4_n | [n] THROW | - 0 nn | For 0 <= n < 2^11 , an encoding of [n] THROW for larger values of n . | 84 |
F2CC_n | [n] THROWARG | x - x nn | Throws exception 0 <= n < 2^11 with parameter x , by copying x and n into the stack of c2 and transferring control to c2 . | 84 |
F2D4_n | [n] THROWIF | f - | For 0 <= n < 2^11 , an encoding of [n] THROWIF for larger values of n . | 34/84 |
F2DC_n | [n] THROWARGIF | x f - | Throws exception 0 <= nn < 2^11 with parameter x only if integer f!=0 . | 34/84 |
F2E4_n | [n] THROWIFNOT | f - | For 0 <= n < 2^11 , an encoding of [n] THROWIFNOT for larger values of n . | 34/84 |
F2EC_n | [n] THROWARGIFNOT | x f - | Throws exception 0 <= n < 2^11 with parameter x only if integer f=0 . | 34/84 |
F2F0 | THROWANY | n - 0 n | Throws exception 0 <= n < 2^16 with parameter zero.Approximately equivalent to ZERO SWAP THROWARGANY . | 76 |
F2F1 | THROWARGANY | x n - x n | Throws exception 0 <= n < 2^16 with parameter x , transferring control to the continuation in c2 .Approximately equivalent to c2 PUSHCTR 2 JMPXARGS . | 76 |
F2F2 | THROWANYIF | n f - | Throws exception 0 <= n < 2^16 with parameter zero only if f!=0 . | 26/76 |
F2F3 | THROWARGANYIF | x n f - | Throws exception 0 <= n<2^16 with parameter x only if f!=0 . | 26/76 |
F2F4 | THROWANYIFNOT | n f - | Throws exception 0 <= n<2^16 with parameter zero only if f=0 . | 26/76 |
F2F5 | THROWARGANYIFNOT | x n f - | Throws exception 0 <= n<2^16 with parameter x only if f=0 . | 26/76 |
F2FF | TRY | c c' - | Sets c2 to c' , first saving the old value of c2 both into the savelist of c' and into the savelist of the current continuation, which is stored into c.c0 and c'.c0 . Then runs c similarly to EXECUTE . If c does not throw any exceptions, the original value of c2 is automatically restored on return from c . If an exception occurs, the execution is transferred to c' , but the original value of c2 is restored in the process, so that c' can re-throw the exception by THROWANY if it cannot handle it by itself. | 26 |
F2FF | TRY:<{ code1 }>CATCH<{ code2 }> | - | Equivalent to <{ code1 }> CONT <{ code2 }> CONT TRY . | |
F3pr | [p] [r] TRYARGS | c c' - | Similar to TRY , but with [p] [r] CALLXARGS internally used instead of EXECUTE .In this way, all but the top 0 <= p <= 15 stack elements will be saved into current continuation's stack, and then restored upon return from either c or c' , with the top 0 <= r <= 15 values of the resulting stack of c or c' copied as return values. | 26 |