This commit is contained in:
Yuichi Nishiwaki 2014-03-24 14:58:09 +09:00
parent 0fcd1a3e10
commit 8451bd5c19
1 changed files with 18 additions and 18 deletions

View File

@ -11,6 +11,24 @@
#include "picrin/string.h" #include "picrin/string.h"
#include "picrin/error.h" #include "picrin/error.h"
void
pic_abort(pic_state *pic, const char *msg)
{
UNUSED(pic);
fprintf(stderr, "abort: %s\n", msg);
fflush(stderr);
abort();
}
void
pic_warn(pic_state *pic, const char *msg)
{
UNUSED(pic);
fprintf(stderr, "warn: %s\n", msg);
}
void void
pic_push_try(pic_state *pic) pic_push_try(pic_state *pic)
{ {
@ -77,24 +95,6 @@ pic_errorf(pic_state *pic, const char *fmt, ...)
pic_throw(pic, e); pic_throw(pic, e);
} }
void
pic_abort(pic_state *pic, const char *msg)
{
UNUSED(pic);
fprintf(stderr, "abort: %s\n", msg);
fflush(stderr);
abort();
}
void
pic_warn(pic_state *pic, const char *msg)
{
UNUSED(pic);
fprintf(stderr, "warn: %s\n", msg);
}
static pic_value static pic_value
pic_error_with_exception_handler(pic_state *pic) pic_error_with_exception_handler(pic_state *pic)
{ {