blob: 43a3948c144f5d79869609b10db7ada738d80713 [file] [log] [blame]
sewardj5cf515f2004-06-26 20:10:35 +00001
2#include <stdio.h>
3#include <stdlib.h>
4#include "basictypes.h"
5
6__attribute__ ((noreturn))
7void vex_assert_fail ( const Char* expr,
8 const Char* file, Int line, const Char* fn )
9{
10 fprintf(stderr, "\nvex: %s:%d (%s): Assertion `%s' failed.\n",
11 file, line, fn, expr );
12 exit(1);
13}
14
15__attribute__ ((noreturn))
16void panic ( Char* str )
17{
18 fprintf(stderr, "\nvex: the `impossible' happened:\n %s\n", str);
19 exit(1);
20}