13 lines
421 B
C++
13 lines
421 B
C++
#ifndef PLANTSUNCAT_FAIL_FAST_H
|
|
#define PLANTSUNCAT_FAIL_FAST_H
|
|
#include <atomic>
|
|
#include <functional>
|
|
#include <string>
|
|
namespace Psc {
|
|
extern std::atomic_int stop_program; // == 0 是正常运行
|
|
void fail_fast(std::string = "");
|
|
void set_fail_fast(std::function<void(std::string)> ff);
|
|
// 用于逻辑错误生成core_dump文件用于分析
|
|
void fail_fast_core_dump(std::string msg = "");
|
|
}
|
|
#endif |