mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +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);
|
||||
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());
|
||||
|
|
Loading…
Reference in a new issue