[Quests] Improve Quest Error Handling (#2635)

* Improve Quest Error handling

* Update embperl.cpp

* Bench test (temp)

* Swap log category for benchmark

* Swap external process invocation for native Perl eval throw
This commit is contained in:
Chris Miles
2022-12-12 19:21:33 -06:00
committed by GitHub
parent ae4908b40c
commit c3cb0b8cdf
5 changed files with 42 additions and 19 deletions
+10
View File
@@ -861,6 +861,16 @@
OutF(LogSys, Logs::Detail, Logs::Bugs, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogQuestErrors(message, ...) do {\
if (LogSys.IsLogEnabled(Logs::General, Logs::QuestErrors))\
OutF(LogSys, Logs::General, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogQuestErrorsDetail(message, ...) do {\
if (LogSys.IsLogEnabled(Logs::Detail, Logs::QuestErrors))\
OutF(LogSys, Logs::Detail, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define Log(debug_level, log_category, message, ...) do {\
if (LogSys.IsLogEnabled(debug_level, log_category))\
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\