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)
25 case old_mismatch_error:
27 case old_system_error:
29 case old_network_error:
31 case old_timeout_error:
33 case old_thread_error:
35 case old_unknown_error:
36 return "unclassified";
38 return "SEVERE ERROR in error repporting module";
42 XBT_LOG_EXTERNAL_CATEGORY(xbt);
43 XBT_LOG_DEFAULT_CATEGORY(xbt);
46 * @brief Kill the program with an error message
49 * Things are so messed up that the only thing to do now, is to stop the program.
51 * The message is handled by a CRITICAL logging request
53 * If you want to pass arguments to the format, you can always write xbt_assert1(0,"fmt",args)
55 void xbt_die(const char *msg)
61 /** @brief Kill the program in silence */