This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2018-10-03 21:52:11 +02:00
|
|
|
#ifndef __IPC_ERROR_H__
|
|
|
|
#define __IPC_ERROR_H__
|
2016-12-21 01:26:47 +01:00
|
|
|
|
2018-10-12 01:59:56 +02:00
|
|
|
// #define IPC_WITH_ERRORS 3
|
2018-10-10 23:18:15 +02:00
|
|
|
|
|
|
|
#ifdef IPC_WITH_ERRORS
|
2018-11-04 09:50:17 +01:00
|
|
|
#include "logger.h"
|
2016-12-21 01:26:47 +01:00
|
|
|
#define handle_error(msg) \
|
2017-08-26 19:42:54 +02:00
|
|
|
do { log_error (msg); exit(EXIT_FAILURE); } while (0)
|
2016-12-21 01:26:47 +01:00
|
|
|
|
|
|
|
#define handle_err(fun,msg)\
|
2017-08-26 19:42:54 +02:00
|
|
|
do { log_error ("%s: file %s line %d %s", fun, __FILE__, __LINE__, msg); } while (0)
|
2018-10-10 23:18:15 +02:00
|
|
|
#else
|
|
|
|
#define handle_error(msg)
|
|
|
|
#define handle_err(fun,msg)
|
|
|
|
#endif
|
2016-12-21 01:26:47 +01:00
|
|
|
|
|
|
|
#endif
|