Drop error instead of throwing an exception to meet non-throwing exception specification

This commit is contained in:
smallmodel 2024-06-07 19:55:33 +02:00
parent 18e5c6e714
commit 884a76db4c
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 4 additions and 2 deletions

View file

@ -2286,7 +2286,8 @@ ScriptThread::~ScriptThread()
assert(m_ScriptVM);
if (!m_ScriptVM) {
// should never happen
throw ScriptException("Attempting to delete a dead thread.");
//throw ScriptException("Attempting to delete a dead thread.");
gi.Error(ERR_DROP, "Attempting to delete a dead thread.");
}
vm = m_ScriptVM;

View file

@ -89,7 +89,8 @@ ScriptClass::ScriptClass()
ScriptClass::~ScriptClass()
{
if (m_Script == NULL) {
throw ScriptException("Attempting to delete dead class.");
//throw ScriptException("Attempting to delete dead class.");
gi.Error(ERR_DROP, "Attempting to delete a dead thread.");
}
KillThreads();