Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 26 files). Show all
Unified · Split
| @@ -101,7 +101,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { · 100 unmodified lines | ||
| 101 | 101 | return true; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | −static bool hadUncauchtExceptions(QScriptEngine& engine, const QString& fileName) { | |
| 104 | +static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName) { | |
| 105 | 105 | if (engine.hasUncaughtException()) { |
| 106 | 106 | const auto backtrace = engine.uncaughtExceptionBacktrace(); |
| 107 | 107 | const auto exception = engine.uncaughtException().toString(); |
| @@ -615,7 +615,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 507 unmodified lines | ||
| 615 | 615 | const auto result = QScriptEngine::evaluate(program); |
| 616 | 616 | --_evaluatesPending; |
| 617 | 617 | |
| 618 | − const auto hadUncaughtException = hadUncauchtExceptions(*this, program.fileName()); | |
| 618 | + const auto hadUncaughtException = hadUncaughtExceptions(*this, program.fileName()); | |
| 619 | 619 | if (_wantSignals) { |
| 620 | 620 | emit evaluationFinished(result, hadUncaughtException); |
| 621 | 621 | } |
| @@ -684,9 +684,8 @@ void ScriptEngine::run() { · 62 unmodified lines | ||
| 684 | 684 | } |
| 685 | 685 | lastUpdate = now; |
| 686 | 686 | |
| 687 | − if (hadUncauchtExceptions(*this, _fileNameString)) { | |
| 688 | − stop(); | |
| 689 | − } | |
| 687 | + // Debug and clear exceptions | |
| 688 | + hadUncaughtExceptions(*this, _fileNameString); | |
| 690 | 689 | } |
| 691 | 690 | |
| 692 | 691 | stopAllTimers(); // make sure all our timers are stopped if the script is ending |
| @@ -1021,7 +1020,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 328 unmodified lines | ||
| 1021 | 1020 | |
| 1022 | 1021 | QScriptEngine sandbox; |
| 1023 | 1022 | QScriptValue testConstructor = sandbox.evaluate(program); |
| 1024 | − if (hadUncauchtExceptions(sandbox, program.fileName())) { | |
| 1023 | + if (hadUncaughtExceptions(sandbox, program.fileName())) { | |
| 1025 | 1024 | return; |
| 1026 | 1025 | } |
| 1027 | 1026 | |