Namespaces | Macros | Functions
err.hpp File Reference
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <netdb.h>
#include "likely.hpp"
Include dependency graph for err.hpp:

Go to the source code of this file.

Namespaces

 zmq
 

Macros

#define alloc_assert(x)
 
#define EPROTO   0
 
#define errno_assert(x)
 
#define gai_assert(x)
 
#define posix_assert(x)
 
#define zmq_assert(x)
 

Functions

const char * zmq::errno_to_string (int errno_)
 
void zmq::print_backtrace ()
 
void zmq::zmq_abort (const char *errmsg_)
 

Macro Definition Documentation

◆ alloc_assert

#define alloc_assert (   x)
Value:
do { \
if (unlikely (!(x))) { \
fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n", __FILE__, \
__LINE__); \
fflush (stderr); \
zmq::zmq_abort ("FATAL ERROR: OUT OF MEMORY"); \
} \
} while (false)

Definition at line 146 of file err.hpp.

◆ EPROTO

#define EPROTO   0

Definition at line 26 of file err.hpp.

◆ errno_assert

#define errno_assert (   x)
Value:
do { \
if (unlikely (!(x))) { \
const char *errstr = strerror (errno); \
fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__); \
fflush (stderr); \
zmq::zmq_abort (errstr); \
} \
} while (false)

Definition at line 113 of file err.hpp.

◆ gai_assert

#define gai_assert (   x)
Value:
do { \
if (unlikely (x)) { \
const char *errstr = gai_strerror (x); \
fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__); \
fflush (stderr); \
zmq::zmq_abort (errstr); \
} \
} while (false)

Definition at line 135 of file err.hpp.

◆ posix_assert

#define posix_assert (   x)
Value:
do { \
if (unlikely (x)) { \
const char *errstr = strerror (x); \
fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__); \
fflush (stderr); \
zmq::zmq_abort (errstr); \
} \
} while (false)

Definition at line 124 of file err.hpp.

◆ zmq_assert

#define zmq_assert (   x)
Value:
do { \
if (unlikely (!(x))) { \
fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, __FILE__, \
__LINE__); \
fflush (stderr); \
} \
} while (false)

Definition at line 102 of file err.hpp.

zmq::zmq_abort
void zmq_abort(const char *errmsg_)
Definition: err.cpp:50
errno
int errno
x
GLint GLenum GLint x
Definition: glcorearb.h:2834
strerror
char * strerror(int errno)
unlikely
#define unlikely(x)
Definition: likely.hpp:11


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02