report a roc_panic to the user in the web repl

This commit is contained in:
Folkert 2023-10-20 14:29:01 +02:00
parent cd7a031d09
commit 793ab8ec16
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 59 additions and 2 deletions

View file

@ -52,8 +52,11 @@ void roc_dealloc(void *ptr, unsigned int alignment)
//--------------------------
extern void send_panic_msg_to_js(void *ptr, unsigned int alignment);
void roc_panic(void *ptr, unsigned int alignment)
{
send_panic_msg_to_js(ptr, alignment);
#if ENABLE_PRINTF
char *msg = (char *)ptr;
fprintf(stderr,