#pragma once #include <assert.h> #define NOTICE_TXT(txt) txt " " "这是一个可恢复的错误,请按【忽略】以继续。 " "如果多次出现错误,您可以按【中止】以终止程序。" #define NOTICE(txt) _assert(NOTICE_TXT(txt), __FILE__, __LINE__) #define ERR_S(txt) do { NOTICE(txt); exit(1); } while (0) #define assert_notify(condition) do { if (!condition) NOTICE(#condition); } while (0)