From f82a0196a8a7e4edfa4c255fd790caafa7130c2a Mon Sep 17 00:00:00 2001 From: humbletim Date: Thu, 23 Feb 2017 18:12:12 -0500 Subject: [PATCH] Always consume exceptions thrown by include's --- libraries/script-engine/src/ScriptEngine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index cee3f2344f..56ebe0d798 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -1365,12 +1365,12 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac doWithEnvironment(capturedEntityIdentifier, capturedSandboxURL, operation); if (tryCatch.hasPending()) { // match previous include behavior where possible by logging, not propagating, exceptions. - // for nested evaluations, exceptions are now allowed to propagate auto err = tryCatch.pending(); emit unhandledException(err); - if (tryCatch.wouldEmit()) { - tryCatch.consume(); - } + // FIXME: to be revisited with next PR 21114-part3 for compat with require/module + //if (tryCatch.wouldEmit()) { + tryCatch.consume(); + //} } } else { scriptWarningMessage("Script.include() skipping evaluation of previously included url:" + url.toString());