diff src/c/urweb.c @ 283:c0e4ac23522d

'error' function
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 10:02:27 -0400
parents 0236d9412ad2
children 77a28e7430bf
line wrap: on
line diff
--- a/src/c/urweb.c	Sun Sep 07 09:28:13 2008 -0400
+++ b/src/c/urweb.c	Sun Sep 07 10:02:27 2008 -0400
@@ -96,7 +96,7 @@
   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 @@
   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;
 }