mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:37:29 +02:00
Always consume exceptions thrown by include's
This commit is contained in:
parent
132a889f74
commit
f82a0196a8
1 changed files with 4 additions and 4 deletions
|
@ -1365,12 +1365,12 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac
|
||||||
doWithEnvironment(capturedEntityIdentifier, capturedSandboxURL, operation);
|
doWithEnvironment(capturedEntityIdentifier, capturedSandboxURL, operation);
|
||||||
if (tryCatch.hasPending()) {
|
if (tryCatch.hasPending()) {
|
||||||
// match previous include behavior where possible by logging, not propagating, exceptions.
|
// match previous include behavior where possible by logging, not propagating, exceptions.
|
||||||
// for nested evaluations, exceptions are now allowed to propagate
|
|
||||||
auto err = tryCatch.pending();
|
auto err = tryCatch.pending();
|
||||||
emit unhandledException(err);
|
emit unhandledException(err);
|
||||||
if (tryCatch.wouldEmit()) {
|
// FIXME: to be revisited with next PR 21114-part3 for compat with require/module
|
||||||
tryCatch.consume();
|
//if (tryCatch.wouldEmit()) {
|
||||||
}
|
tryCatch.consume();
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
scriptWarningMessage("Script.include() skipping evaluation of previously included url:" + url.toString());
|
scriptWarningMessage("Script.include() skipping evaluation of previously included url:" + url.toString());
|
||||||
|
|
Loading…
Reference in a new issue