diff --git a/include/Common.h b/include/Common.h index da7af10..7dca4d4 100644 --- a/include/Common.h +++ b/include/Common.h @@ -1,5 +1,8 @@ #pragma once +#include "TSentry.h" +extern TSentry Sentry; + #include #include #include @@ -79,9 +82,6 @@ void RegisterThread(const std::string str); #define _line std::to_string(__LINE__) #define _in_lambda (std::string(__func__) == "operator()") -#include "TSentry.h" -extern TSentry Sentry; - // we would like the full function signature 'void a::foo() const' // on windows this is __FUNCSIG__, on GCC it's __PRETTY_FUNCTION__, // feel free to add more diff --git a/include/TSentry.h b/include/TSentry.h index 8495eb0..63e556c 100644 --- a/include/TSentry.h +++ b/include/TSentry.h @@ -2,6 +2,7 @@ #define SENTRY_H #include + #include // TODO possibly use attach_stacktrace diff --git a/src/main.cpp b/src/main.cpp index 0c3a35e..1eb1079 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ +#include "TSentry.h" + #include "Common.h" #include "Http.h" -#include "TSentry.h" #include "TConfig.h" #include "THeartbeatThread.h" #include "TLuaEngine.h" @@ -9,7 +10,6 @@ #include "TResourceManager.h" #include "TServer.h" -#include #include #ifdef __unix @@ -58,7 +58,6 @@ int main(int argc, char** argv) try { TServer Server(argc, argv); TConfig Config; - if (Config.Failed()) { info("Closing in 10 seconds"); std::this_thread::sleep_for(std::chrono::seconds(10));