![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_THROW opcode for raising exceptions in the VM. More...

Go to the source code of this file.
Functions | |
| if (f->try_sp >=0) | |
| if (s) | |
| free_value (err) | |
Variables | |
| case | OP_THROW |
| char * | s = value_to_string_alloc(&err) |
| else | |
| vm | fp = -1 |
| break | |
Implements the OP_THROW opcode for raising exceptions in the VM.
This file handles the OP_THROW instruction, which raises an exception. If a matching TRY handler exists in the current frame (pushed via OP_TRY_PUSH), control flow jumps to the handler location and the error value is made available to the catch block via the stack. If no handler is present in the current frame, the error is printed and the VM terminates execution by clearing the frame stack.
Behavior:
Errors:
Definition in file throw.c.
| free_value | ( | err | ) |
| else |
| char* s = value_to_string_alloc(&err) |