#ifndef INJA_THROW

This commit is contained in:
pantor
2021-06-17 19:56:22 +02:00
parent 8d65633b6a
commit e91a2fd350
2 changed files with 16 additions and 8 deletions

View File

@@ -6,13 +6,17 @@
#include <nlohmann/json.hpp>
#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(INJA_NOEXCEPTION)
#ifndef INJA_THROW
#define INJA_THROW(exception) throw exception
#endif
#else
#include <cstdlib>
#include <cstdlib>
#ifndef INJA_THROW
#define INJA_THROW(exception) std::abort()
#ifndef INJA_NOEXCEPTION
#define INJA_NOEXCEPTION
#endif
#endif
#ifndef INJA_NOEXCEPTION
#define INJA_NOEXCEPTION
#endif
#endif
#include "environment.hpp"

View File

@@ -6,13 +6,17 @@
#include <nlohmann/json.hpp>
#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(INJA_NOEXCEPTION)
#ifndef INJA_THROW
#define INJA_THROW(exception) throw exception
#endif
#else
#include <cstdlib>
#include <cstdlib>
#ifndef INJA_THROW
#define INJA_THROW(exception) std::abort()
#ifndef INJA_NOEXCEPTION
#define INJA_NOEXCEPTION
#endif
#endif
#ifndef INJA_NOEXCEPTION
#define INJA_NOEXCEPTION
#endif
#endif
// #include "environment.hpp"