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