mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
Merge pull request #3140 from ctrlaltdavid/script_error_reporting
Fix script errors not being reported
This commit is contained in:
commit
272e8c6e97
1 changed files with 3 additions and 2 deletions
|
@ -515,8 +515,6 @@ void ScriptEngine::run() {
|
|||
|
||||
qint64 now = usecTimestampNow();
|
||||
float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND;
|
||||
emit update(deltaTime);
|
||||
lastUpdate = now;
|
||||
|
||||
if (_engine.hasUncaughtException()) {
|
||||
int line = _engine.uncaughtExceptionLineNumber();
|
||||
|
@ -524,6 +522,9 @@ void ScriptEngine::run() {
|
|||
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString());
|
||||
_engine.clearExceptions();
|
||||
}
|
||||
|
||||
emit update(deltaTime);
|
||||
lastUpdate = now;
|
||||
}
|
||||
emit scriptEnding();
|
||||
|
||||
|
|
Loading…
Reference in a new issue