Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -422,6 +422,12 @@ void ScriptEngine::waitTillDoneRunning() { · 421 unmodified lines | ||
| 422 | 422 | if (isEvaluating()) { |
| 423 | 423 | qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename(); |
| 424 | 424 | abortEvaluation(); |
| 425 | + } else { | |
| 426 | + qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); | |
| 427 | + auto context = currentContext(); | |
| 428 | + if (context) { | |
| 429 | + context->throwError("Timed out during shutdown"); | |
| 430 | + } | |
| 425 | 431 | } |
| 426 | 432 | |
| 427 | 433 | // Wait for the scripting thread to stop running, as |