An error was encountered during evaluation, and has already been set in the ErrorCtx. * If an exception handler has been set, exit this routine and return to * the point on the stack where the handler was instantiated. */
| 78 | * If an exception handler has been set, exit this routine and return to |
| 79 | * the point on the stack where the handler was instantiated. */ |
| 80 | void ErrorCtx_RaiseRuntimeException(const char *err_fmt, ...) { |
| 81 | ErrorCtx *ctx = ErrorCtx_Get(); |
| 82 | ASSERT(ctx != NULL); |
| 83 | |
| 84 | // set error if specified |
| 85 | if(err_fmt != NULL) { |
| 86 | va_list valist; |
| 87 | va_start(valist, err_fmt); |
| 88 | _ErrorCtx_SetError(err_fmt, valist); |
| 89 | va_end(valist); |
| 90 | } |
| 91 | |
| 92 | jmp_buf *env = ctx->breakpoint; |
| 93 | // If the exception handler hasn't been set, this function returns to the caller, |
| 94 | // which will manage its own freeing and error reporting. |
| 95 | if(env != NULL) longjmp(*env, 1); |
| 96 | } |
| 97 | |
| 98 | // Reply to caller with error |
| 99 | void ErrorCtx_EmitException(void) { |
no test coverage detected