History

Always consume exceptions thrown by include's

humbletim committed 9 years ago

Commit f82a0191 parent 132a8891 file · +4 −4Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+4−4
@@ -1365,12 +1365,12 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 1364 unmodified lines
13651365 doWithEnvironment(capturedEntityIdentifier, capturedSandboxURL, operation);
13661366 if (tryCatch.hasPending()) {
13671367 // match previous include behavior where possible by logging, not propagating, exceptions.
1368− // for nested evaluations, exceptions are now allowed to propagate
13691368 auto err = tryCatch.pending();
13701369 emit unhandledException(err);
1371− if (tryCatch.wouldEmit()) {
1372− tryCatch.consume();
1373− }
1370+ // FIXME: to be revisited with next PR 21114-part3 for compat with require/module
1371+ //if (tryCatch.wouldEmit()) {
1372+ tryCatch.consume();
1373+ //}
13741374 }
13751375 } else {
13761376 scriptWarningMessage("Script.include() skipping evaluation of previously included url:" + url.toString());