mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-15 21:23:57 +00:00
Have roc_panic raise a Ruby exception
This commit is contained in:
parent
e9e3537738
commit
b6575e86d7
1 changed files with 1 additions and 4 deletions
|
|
@ -20,10 +20,7 @@ void roc_dealloc(void *ptr, unsigned int alignment) { free(ptr); }
|
|||
|
||||
__attribute__((noreturn)) void roc_panic(void *ptr, unsigned int alignment)
|
||||
{
|
||||
uint8_t *msg = (uint8_t *)ptr;
|
||||
fprintf(stderr,
|
||||
"Application crashed with message\n\n %s\n\nShutting down\n", msg);
|
||||
exit(0);
|
||||
rb_raise(rb_eException, "%s", (char *)ptr);
|
||||
}
|
||||
|
||||
void *roc_memcpy(void *dest, const void *src, size_t n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue