sewardj | 5cf515f | 2004-06-26 20:10:35 +0000 | [diff] [blame] | 1 | |
2 | #include <stdio.h> | ||||
3 | #include <stdlib.h> | ||||
4 | #include "basictypes.h" | ||||
5 | |||||
6 | __attribute__ ((noreturn)) | ||||
7 | void 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)) | ||||
16 | void panic ( Char* str ) | ||||
17 | { | ||||
18 | fprintf(stderr, "\nvex: the `impossible' happened:\n %s\n", str); | ||||
19 | exit(1); | ||||
20 | } |