Skip to content
Snippets Groups Projects
Commit d3cdf22c authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

fix header includes

parent 610d9313
No related branches found
No related tags found
No related merge requests found
...@@ -11,29 +11,30 @@ ...@@ -11,29 +11,30 @@
#define BASELIB_ERROR_H #define BASELIB_ERROR_H
#ifdef OGS_FATAL_ABORT #ifdef OGS_FATAL_ABORT
#include <cstdlib>
#endif
#include <stdexcept>
#ifdef OGS_FATAL_ABORT #include <cstdlib>
#include <logog/include/logog.hpp> #include <logog/include/logog.hpp>
#endif
#include "StringTools.h" #include "StringTools.h"
#include "FileTools.h"
#define OGS_STR(x) #x
#define OGS_STRINGIFY(x) OGS_STR(x)
#define OGS_LOCATION " at " + BaseLib::extractBaseName(__FILE__) + ", line " OGS_STRINGIFY(__LINE__)
#ifdef OGS_FATAL_ABORT
#define OGS_FATAL(fmt, ...)\ #define OGS_FATAL(fmt, ...)\
{\ {\
ERR("%s", BaseLib::format(fmt, ##__VA_ARGS__).data());\ ERR("%s", BaseLib::format(fmt, ##__VA_ARGS__).data());\
std::abort();\ std::abort();\
} }
#else
#else // OGS_FATAL_ABORT
#include <stdexcept>
#include "FileTools.h"
#include "StringTools.h"
#define OGS_STR(x) #x
#define OGS_STRINGIFY(x) OGS_STR(x)
#define OGS_LOCATION " at " + BaseLib::extractBaseName(__FILE__) + ", line " OGS_STRINGIFY(__LINE__)
#define OGS_FATAL(fmt, ...)\ #define OGS_FATAL(fmt, ...)\
throw std::runtime_error(BaseLib::format(fmt, ##__VA_ARGS__) + OGS_LOCATION); throw std::runtime_error(BaseLib::format(fmt, ##__VA_ARGS__) + OGS_LOCATION);
#endif
#endif // OGS_FATAL_ABORT
#endif //BASELIB_ERROR_H #endif //BASELIB_ERROR_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment