Sentry: sort by response code

This commit is contained in:
Lion Kortlepel
2021-08-11 23:13:23 +02:00
committed by Lion
parent 683e13a4a0
commit 4b92532203
5 changed files with 15 additions and 8 deletions

View File

@@ -61,12 +61,14 @@ inline void _assert([[maybe_unused]] const char* file, [[maybe_unused]] const ch
// In release build, these macros turn into NOPs. The compiler will optimize these out.
#define Assert(cond) \
do { \
bool result = (cond); \
if (!result) { \
Sentry.LogAssert(#cond, _file_basename, _line, __func__); \
} \
} while (false)
#define AssertNotReachable() \
do { \
bool result = (cond); \
if (!result) { \
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
} \

View File

@@ -5,5 +5,5 @@
namespace Http {
std::string GET(const std::string& host, int port, const std::string& target);
std::string POST(const std::string& host, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, bool json);
}
std::string POST(const std::string& host, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, bool json, int* status = nullptr);
}