Showing the changes to libraries/script-engine/src/v8/ScriptEngineV8.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1020,7 +1020,7 @@ void ScriptEngineV8::setUncaughtException(const v8::TryCatch &tryCatch, const QS · 1019 unmodified lines | |||
| 1020 | return; | 1020 | return; |
| 1021 | } | 1021 | } |
| 1022 | 1022 | ||
| 1023 | auto ex = std::make_shared<ScriptException>(); | 1023 | auto ex = std::make_shared<ScriptRuntimeException>(); |
| 1024 | ex->additionalInfo = info; | 1024 | ex->additionalInfo = info; |
| 1025 | 1025 | ||
| 1026 | v8::Locker locker(_v8Isolate); | 1026 | v8::Locker locker(_v8Isolate); |
| @@ -1036,6 +1036,10 @@ void ScriptEngineV8::setUncaughtException(const v8::TryCatch &tryCatch, const QS · 9 unmodified lines | |||
| 1036 | 1036 | ||
| 1037 | ex->errorMessage = QString(*utf8Value); | 1037 | ex->errorMessage = QString(*utf8Value); |
| 1038 | 1038 | ||
| 1039 | auto exceptionValue = tryCatch.Exception(); | ||
| 1040 | ex->thrownValue = ScriptValue(new ScriptValueV8Wrapper(this, V8ScriptValue(this, exceptionValue))); | ||
| 1041 | |||
| 1042 | |||
| 1039 | v8::Local<v8::Message> exceptionMessage = tryCatch.Message(); | 1043 | v8::Local<v8::Message> exceptionMessage = tryCatch.Message(); |
| 1040 | if (!exceptionMessage.IsEmpty()) { | 1044 | if (!exceptionMessage.IsEmpty()) { |
| 1041 | ex->errorLine = exceptionMessage->GetLineNumber(getContext()).FromJust(); | 1045 | ex->errorLine = exceptionMessage->GetLineNumber(getContext()).FromJust(); |