History

Merge branch 'master' into HEAD

Brad Davis committed 11 years ago

Commit ccbae812 parents af20c64 ac1055c26 files · +245 −183Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 26 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+5−6
@@ -101,7 +101,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { · 100 unmodified lines
101101 return true;
102102 }
103103
104−static bool hadUncauchtExceptions(QScriptEngine& engine, const QString& fileName) {
104+static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName) {
105105 if (engine.hasUncaughtException()) {
106106 const auto backtrace = engine.uncaughtExceptionBacktrace();
107107 const auto exception = engine.uncaughtException().toString();
@@ -615,7 +615,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 507 unmodified lines
615615 const auto result = QScriptEngine::evaluate(program);
616616 --_evaluatesPending;
617617
618− const auto hadUncaughtException = hadUncauchtExceptions(*this, program.fileName());
618+ const auto hadUncaughtException = hadUncaughtExceptions(*this, program.fileName());
619619 if (_wantSignals) {
620620 emit evaluationFinished(result, hadUncaughtException);
621621 }
@@ -684,9 +684,8 @@ void ScriptEngine::run() { · 62 unmodified lines
684684 }
685685 lastUpdate = now;
686686
687− if (hadUncauchtExceptions(*this, _fileNameString)) {
688− stop();
689− }
687+ // Debug and clear exceptions
688+ hadUncaughtExceptions(*this, _fileNameString);
690689 }
691690
692691 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
10211020
10221021 QScriptEngine sandbox;
10231022 QScriptValue testConstructor = sandbox.evaluate(program);
1024− if (hadUncauchtExceptions(sandbox, program.fileName())) {
1023+ if (hadUncaughtExceptions(sandbox, program.fileName())) {
10251024 return;
10261025 }
10271026