mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
CHECK宏支持自定义错误提示
This commit is contained in:
@@ -307,22 +307,10 @@ const string kMediaTimeoutMS = "media_timeout_ms";
|
||||
const string kBeatIntervalMS = "beat_interval_ms";
|
||||
const string kMaxAnalysisMS = "max_analysis_ms";
|
||||
const string kBenchmarkMode = "benchmark_mode";
|
||||
|
||||
}
|
||||
|
||||
} // namespace mediakit
|
||||
|
||||
extern "C" {
|
||||
void Assert_Throw(int failed, const char *exp, const char *func, const char *file, int line) {
|
||||
if (failed) {
|
||||
_StrPrinter printer;
|
||||
printer << "Assertion failed: (" << exp << "), function " << func << ", file " << file << ", line " << line
|
||||
<< ".";
|
||||
throw std::runtime_error(printer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MEM_DEBUG
|
||||
|
||||
static atomic<uint64_t> mem_usage(0);
|
||||
|
||||
Reference in New Issue
Block a user