Have roc_panic raise a Ruby exception

This commit is contained in:
Richard Feldman 2022-11-03 02:00:45 -04:00
parent e9e3537738
commit b6575e86d7
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -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)