History

resolve conflicts on merge with upstream master

Stephen Birarda committed 11 years ago

Commit d03a8372 parents 2ecec26 1b6a2ff46 files · +1108 −415Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+6−7
@@ -96,7 +96,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { · 95 unmodified lines
9696 return true;
9797 }
9898
99−static bool hadUncauchtExceptions(QScriptEngine& engine, const QString& fileName) {
99+static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName) {
100100 if (engine.hasUncaughtException()) {
101101 const auto backtrace = engine.uncaughtExceptionBacktrace();
102102 const auto exception = engine.uncaughtException().toString();
@@ -616,7 +616,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 513 unmodified lines
616616 const auto result = QScriptEngine::evaluate(program);
617617 --_evaluatesPending;
618618
619− const auto hadUncaughtException = hadUncauchtExceptions(*this, program.fileName());
619+ const auto hadUncaughtException = hadUncaughtExceptions(*this, program.fileName());
620620 if (_wantSignals) {
621621 emit evaluationFinished(result, hadUncaughtException);
622622 }
@@ -684,10 +684,9 @@ void ScriptEngine::run() { · 61 unmodified lines
684684 }
685685 }
686686 lastUpdate = now;
687−
688− if (hadUncauchtExceptions(*this, _fileNameString)) {
689− stop();
690− }
687+
688+ // Debug and clear exceptions
689+ hadUncaughtExceptions(*this, _fileNameString);
691690 }
692691
693692 stopAllTimers(); // make sure all our timers are stopped if the script is ending
@@ -1022,7 +1021,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 328 unmodified lines
10221021
10231022 QScriptEngine sandbox;
10241023 QScriptValue testConstructor = sandbox.evaluate(program);
1025− if (hadUncauchtExceptions(sandbox, program.fileName())) {
1024+ if (hadUncaughtExceptions(sandbox, program.fileName())) {
10261025 return;
10271026 }
10281027