SimGrid  3.21
Versatile Simulation of Distributed Systems
ex.h File Reference
#include <stdlib.h>
#include <xbt/base.h>
#include <xbt/misc.h>
#include <xbt/sysdep.h>
#include <xbt/virtu.h>

Macros

#define THROW(c, v)
 Builds and throws an exception. More...
 
#define THROWF(c, v, ...)
 Builds and throws an exception with a printf-like formatted message. More...
 
#define THROW_IMPOSSIBLE   xbt_throw_impossible(__FILE__, __LINE__, __func__)
 Throw an exception because something impossible happened. More...
 
#define THROW_UNIMPLEMENTED   xbt_throw_unimplemented(__FILE__, __LINE__, __func__)
 
#define DIE_IMPOSSIBLE   xbt_die("The Impossible Did Happen (yet again)")
 Die because something impossible happened. More...
 

Typedefs

typedef struct xbt_ex xbt_ex_t
 

Enumerations

enum  xbt_errcat_t {
  unknown_error = 0, arg_error, bound_error, mismatch_error,
  not_found_error, system_error, network_error, timeout_error,
  cancel_error, thread_error, host_error, tracing_error,
  io_error, vm_error
}
 Categories of errors. More...
 

Functions

const char * xbt_ex_catname (xbt_errcat_t cat)
 Get the name of a category. More...
 
void _xbt_throw (char *message, xbt_errcat_t errcat, int value, const char *file, int line, const char *func)
 Helper function used to throw exceptions in C. More...
 
void xbt_throw_impossible (const char *file, int line, const char *func)
 
void xbt_throw_unimplemented (const char *file, int line, const char *func)
 Throw an exception because something unimplemented stuff has been attempted. More...
 
void xbt_ex_display (xbt_ex_t *e)
 Display an exception. More...
 

Macro Definition Documentation

◆ THROW_UNIMPLEMENTED

#define THROW_UNIMPLEMENTED   xbt_throw_unimplemented(__FILE__, __LINE__, __func__)

Typedef Documentation

◆ xbt_ex_t

typedef struct xbt_ex xbt_ex_t

Function Documentation

◆ _xbt_throw()

void _xbt_throw ( char *  message,
xbt_errcat_t  errcat,
int  value,
const char *  file,
int  line,
const char *  func 
)

Helper function used to throw exceptions in C.

◆ xbt_throw_impossible()

void xbt_throw_impossible ( const char *  file,
int  line,
const char *  func 
)

◆ xbt_ex_display()

void xbt_ex_display ( xbt_ex_t e)

Display an exception.