More work on exceptions.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-31 14:17:38 +02:00
parent 9c93ca6995
commit bd7ecb6b33
3 changed files with 18 additions and 4 deletions

View File

@@ -5,7 +5,11 @@
auto next = aggregator.GetNext(); \
if (next == nullptr) \
continue; \
next->hookName(__VA_ARGS__); \
try { \
next->hookName(__VA_ARGS__); \
} catch (const std::exception& e) { \
THROW_CREATURE("Exception running script hook '" #hookName "': " << e.what()) \
} \
} \
}
@@ -16,6 +20,10 @@
auto next = aggregator.GetNext(); \
if (next == nullptr) \
continue; \
next->hookName(__VA_ARGS__); \
try { \
next->hookName(__VA_ARGS__); \
} catch (const std::exception& e) { \
THROW_CREATURE("Exception running script hook '" #hookName "': " << e.what()) \
} \
} \
}