Skip to main content

Exception Generating and Handling

TVM Instructions Content List

OpcodeFift syntaxStackDescriptionGas
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 nThrows 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] THROWIFf - Throws exception 0 <= n <= 63 with parameter zero only if integer f!=0.26/76
F2A_n[n] THROWIFNOTf - Throws exception 0 <= n <= 63 with parameter zero only if integer f=0.26/76
F2C4_n[n] THROW- 0 nnFor 0 <= n < 2^11, an encoding of [n] THROW for larger values of n.84
F2CC_n[n] THROWARGx - x nnThrows 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] THROWIFf - For 0 <= n < 2^11, an encoding of [n] THROWIF for larger values of n.34/84
F2DC_n[n] THROWARGIFx f - Throws exception 0 <= nn < 2^11 with parameter x only if integer f!=0.34/84
F2E4_n[n] THROWIFNOTf - For 0 <= n < 2^11, an encoding of [n] THROWIFNOT for larger values of n.34/84
F2EC_n[n] THROWARGIFNOTx f - Throws exception 0 <= n < 2^11 with parameter x only if integer f=0.34/84
F2F0THROWANYn - 0 nThrows exception 0 <= n < 2^16 with parameter zero.
Approximately equivalent to ZERO SWAP THROWARGANY.
76
F2F1THROWARGANYx n - x nThrows exception 0 <= n < 2^16 with parameter x, transferring control to the continuation in c2.
Approximately equivalent to c2 PUSHCTR 2 JMPXARGS.
76
F2F2THROWANYIFn f - Throws exception 0 <= n < 2^16 with parameter zero only if f!=0.26/76
F2F3THROWARGANYIFx n f - Throws exception 0 <= n<2^16 with parameter x only if f!=0.26/76
F2F4THROWANYIFNOTn f - Throws exception 0 <= n<2^16 with parameter zero only if f=0.26/76
F2F5THROWARGANYIFNOTx n f - Throws exception 0 <= n<2^16 with parameter x only if f=0.26/76
F2FFTRYc 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
F2FFTRY:<{ code1 }>CATCH<{ code2 }>-Equivalent to <{ code1 }> CONT <{ code2 }> CONT TRY.
F3pr[p] [r] TRYARGSc 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

TVM Instructions Content List