1 /* error - Error handling functions */
3 /* Copyright (c) 2004, 2005, 2006, 2008, 2010. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "xbt/sysdep.h"
12 * \brief Usefull to do nice error repporting messages.
15 * \return the printable name of an error code
18 const char *xbt_error_name(xbt_error_t errcode) {
22 case no_error: return "success";
23 case old_mismatch_error: return "mismatch";
24 case old_system_error: return "system";
25 case old_network_error: return "network";
26 case old_timeout_error: return "timeout";
27 case old_thread_error: return "thread";
28 case old_unknown_error: return "unclassified";
30 return "SEVERE ERROR in error repporting module";
34 XBT_LOG_EXTERNAL_CATEGORY(xbt);
35 XBT_LOG_DEFAULT_CATEGORY(xbt);
38 * @brief Kill the program with an error message
41 * Things are so messed up that the only thing to do now, is to stop the program.
43 * The message is handled by a CRITICAL logging request
45 * If you want to pass arguments to the format, you can always write xbt_assert1(0,"fmt",args)
47 void xbt_die (const char *msg) {
52 /** @brief Kill the program in silence */
53 void xbt_abort(void) {