mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:36:47 +02:00
Fix script errors not being reported
Script.update event needs to be emitted after reporting any script errors.
This commit is contained in:
parent
e579be82a2
commit
bc785115a9
1 changed files with 3 additions and 2 deletions
|
@ -515,8 +515,6 @@ void ScriptEngine::run() {
|
||||||
|
|
||||||
qint64 now = usecTimestampNow();
|
qint64 now = usecTimestampNow();
|
||||||
float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND;
|
float deltaTime = (float) (now - lastUpdate) / (float) USECS_PER_SECOND;
|
||||||
emit update(deltaTime);
|
|
||||||
lastUpdate = now;
|
|
||||||
|
|
||||||
if (_engine.hasUncaughtException()) {
|
if (_engine.hasUncaughtException()) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
|
@ -524,6 +522,9 @@ void ScriptEngine::run() {
|
||||||
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString());
|
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString());
|
||||||
_engine.clearExceptions();
|
_engine.clearExceptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit update(deltaTime);
|
||||||
|
lastUpdate = now;
|
||||||
}
|
}
|
||||||
emit scriptEnding();
|
emit scriptEnding();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue