3 /* error - Error handling functions */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2001,2002,2003,2004 the OURAGAN project. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "xbt/error.h"
12 /** \defgroup XBT_error Error tracking support.
13 * \brief This section describes a set of macros used to handle errors easily.
17 * \brief Usefull to do nice error repporting messages.
20 * \return the printable name of an error code
23 const char *xbt_error_name(xbt_error_t errcode) {
27 case no_error: return "success";
28 case mismatch_error: return "mismatch";
29 case system_error: return "system";
30 case network_error: return "network";
31 case timeout_error: return "timeout";
32 case thread_error: return "thread";
33 case unknown_error: return "unclassified";
35 return "SEVERE ERROR in error repporting module";
39 XBT_LOG_EXTERNAL_CATEGORY(xbt);
40 XBT_LOG_DEFAULT_CATEGORY(xbt);
46 * Things are so messed up that the only thing to do now, is to stop the program.
48 void xbt_die (const char *msg) {