summaryrefslogtreecommitdiff
path: root/ucode.c
diff options
context:
space:
mode:
Diffstat (limited to 'ucode.c')
-rw-r--r--ucode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ucode.c b/ucode.c
index 69da3da..aa5d5b4 100644
--- a/ucode.c
+++ b/ucode.c
@@ -195,9 +195,12 @@ 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);
+ "Exception while executing ucode program %s:\n",
+ current_prefix->handler);
switch (ex->type) {
case EXCEPTION_SYNTAX: printf("Syntax error"); break;
@@ -226,6 +229,7 @@ uh_ucode_state_init(struct ucode_prefix *ucode)
uc_value_t *v;
int exitcode;
+ uc_search_path_init(&config.module_search_path);
uc_vm_init(vm, &config);
uc_stdlib_load(uc_vm_scope_get(vm));