summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-08-02 13:40:28 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2022-08-02 15:38:35 +0300
commitf9db53870705f7c708e8fb93aed8dd636adafc94 (patch)
tree8a44090c16b8c63ee3cdedadd69dd7c3cc9389f2
parent8ba0b640aed7df39f2ce6d4c2182207b3294849e (diff)
ucode: ignore exit exceptions
A request handler might legitimately call `exit()`, don't raise a server error in this case. Signed-off-by: Jo-Philipp Wich <jo@mein.io> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
-rw-r--r--ucode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ucode.c b/ucode.c
index 69da3da..e76f441 100644
--- a/ucode.c
+++ b/ucode.c
@@ -195,6 +195,9 @@ uh_ucode_exception(uc_vm_t *vm, uc_exception_t *ex)
{
uc_value_t *ctx;
+ if (ex->type == EXCEPTION_EXIT)
+ return;
+
printf("Status: 500 Internal Server Error\r\n\r\n"
"Exception while executing ucode program %s:\n",
current_prefix->handler);