mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
使用抛异常替代asset,提高代码稳定性
This commit is contained in:
@@ -295,3 +295,10 @@ const string kBenchmarkMode = "benchmark_mode";
|
||||
} // namespace mediakit
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user