#ifndef INJA_THROW
diff --git a/include/inja/inja.hpp b/include/inja/inja.hpp
index 49170ad..b4f79cd 100644
--- a/include/inja/inja.hpp
+++ b/include/inja/inja.hpp
@@ -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"
diff --git a/single_include/inja/inja.hpp b/single_include/inja/inja.hpp
index d719cc9..61186c1 100644
--- a/single_include/inja/inja.hpp
+++ b/single_include/inja/inja.hpp
@@ -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"