diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 10:02:27 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 10:02:27 -0400 |
commit | 700a48cc6e78f75166b6e322207a29981782c4e3 (patch) | |
tree | b457a00c7d51e21cfedb1ca9f1b2993d6771f74a /src/c | |
parent | 1777fbbddce252990fc5055e4e5462123938483c (diff) |
'error' function
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 6f54e1a7..c5f3a716 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -96,7 +96,7 @@ failure_kind lw_begin(lw_context ctx, char *path) { return r; } -void lw_error(lw_context ctx, failure_kind fk, const char *fmt, ...) { +__attribute__((noreturn)) void lw_error(lw_context ctx, failure_kind fk, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -105,6 +105,10 @@ void lw_error(lw_context ctx, failure_kind fk, const char *fmt, ...) { longjmp(ctx->jmp_buf, fk); } +__attribute__((noreturn)) void lw_Basis_error(lw_context ctx, const char *s) { + lw_error(ctx, FATAL, s); +} + char *lw_error_message(lw_context ctx) { return ctx->error_message; } |