#include <typeinfo>
#include <type_traits>
+#include <xbt/ex.hpp>
#include <xbt/config.h>
#include <xbt/config.hpp>
#include "xbt/misc.h"
namespace simgrid {
namespace config {
-missing_key_error::~missing_key_error() noexcept {}
+missing_key_error::~missing_key_error() {}
class Config;
// Exit from the catch blog (and do the correct exceptio cleaning)
// before attempting to THROWF.
#define TRANSLATE_EXCEPTIONS(...) \
- catch(simgrid::config::missing_key_error& e) { goto on_exception; } \
- catch(...) { goto on_missing_key; } \
- on_missing_key: THROWF(not_found_error, 0, __VA_ARGS__); \
- on_exception: THROWF(not_found_error, 0, __VA_ARGS__);
+ catch(simgrid::config::missing_key_error& e) { THROWF(not_found_error, 0, __VA_ARGS__); abort(); } \
+ catch(...) { THROWF(not_found_error, 0, __VA_ARGS__); abort(); }
/** @brief Set the value of a variable, using the string representation of that value
*
#include "xbt.h"
#include "xbt/ex.h"
+#include <xbt/ex.hpp>
#include <xbt/config.hpp>
xbt_test_add("Access to a non-existant entry");
{
- xbt_ex_t e;
-
- TRY {
+ try {
xbt_cfg_set_parse("color:blue");
- } CATCH(e) {
+ } catch(xbt_ex& e) {
if (e.category != not_found_error)
xbt_test_exception(e);
- xbt_ex_free(e);
}
}
xbt_cfg_free(&simgrid_config);