diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-07-05 16:17:01 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-07-11 15:49:14 +0200 |
commit | ef0baf1d8f2ae5fc4ec48bd99dcc7424605356e6 (patch) | |
tree | fcf8b500fdc469325f7a42a904ee7bf0c434c74f | |
parent | b11a2fa661058ef9788b9ff4d1e22ce98f1cbda7 (diff) |
vm: cosmetic fix for outputting exceptions without source context
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2017,7 +2017,10 @@ uc_vm_output_exception(uc_vm *vm) ctx = ucv_object_get(ucv_array_get(vm->exception.stacktrace, 0), "context", NULL); - fprintf(stderr, "%s\n\n", ucv_string_get(ctx)); + if (ctx) + fprintf(stderr, "%s\n", ucv_string_get(ctx)); + + fprintf(stderr, "\n"); } static uc_vm_status_t |