mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
report a roc_panic to the user in the web repl
This commit is contained in:
parent
cd7a031d09
commit
793ab8ec16
2 changed files with 59 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue