Make default s_callbackRemoveName not throw.

This commit is contained in:
hispidence 2021-08-27 19:07:55 +01:00
parent 6bc5a561a0
commit 96441572bf

View file

@ -31,9 +31,10 @@ template <typename T, typename S> callbackSetName<S> GameScriptNamedBase<T, S>::
return false;
};
// this could potentially be called by the GameScriptItemInfo destructor, and thus cannot throw
template <typename T, typename S> callbackRemoveName GameScriptNamedBase<T, S>::s_callbackRemoveName = [](std::string const& n) {
std::string err = "\"Remove Name\" callback is not set.";
throw TENScriptException(err);
TENLog("\"Remove Name\" callback is not set.", LogLevel::Error);
std::terminate();
return false;
};