aboutsummaryrefslogtreecommitdiff
path: root/deps/ae/redisassert.h
blob: 8abecfb49c368f6720a24720ea9dbd2cd1b0f929 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* redisassert.h - simplified assert for standalone ae library */
#ifndef __REDIS_ASSERT_H__
#define __REDIS_ASSERT_H__

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

/* config.h provides redis_unreachable for standalone AE builds. */

/* Panic function for error handling */
#define panic(...) do { \
    fprintf(stderr, "PANIC: " __VA_ARGS__); \
    fprintf(stderr, "\n"); \
    abort(); \
} while(0)

#endif