Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 4 files). Show all
Unified · Split
| @@ -305,9 +305,10 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con · 304 unmodified lines | ||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | // Unhandled exception kills the running script |
| 308 | − stop(false); | |
| 309 | − | |
| 310 | − logException(output); | |
| 308 | + if (_abortOnUncaughtException) { | |
| 309 | + stop(false); | |
| 310 | + logException(output); | |
| 311 | + } | |
| 311 | 312 | }); |
| 312 | 313 | #endif |
| 313 | 314 | |
| @@ -909,7 +910,7 @@ void ScriptManager::run() { · 595 unmodified lines | ||
| 909 | 910 | PROFILE_RANGE(script, _fileNameString); |
| 910 | 911 | _returnValue = _engine->evaluate(_scriptContents, _fileNameString); |
| 911 | 912 | |
| 912 | − if (_engine->hasUncaughtException()) { | |
| 913 | + if (_engine->hasUncaughtException() && _abortOnUncaughtException) { | |
| 913 | 914 | |
| 914 | 915 | qCWarning(scriptengine) << "Engine has uncaught exception, stopping"; |
| 915 | 916 | stop(); |