mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Throw the right exception class, and add the thrown value to it
This commit is contained in:
parent
2a5ec7db3d
commit
cb0c62024d
1 changed files with 5 additions and 1 deletions
|
@ -1020,7 +1020,7 @@ void ScriptEngineV8::setUncaughtException(const v8::TryCatch &tryCatch, const QS
|
|||
return;
|
||||
}
|
||||
|
||||
auto ex = std::make_shared<ScriptException>();
|
||||
auto ex = std::make_shared<ScriptRuntimeException>();
|
||||
ex->additionalInfo = info;
|
||||
|
||||
v8::Locker locker(_v8Isolate);
|
||||
|
@ -1036,6 +1036,10 @@ void ScriptEngineV8::setUncaughtException(const v8::TryCatch &tryCatch, const QS
|
|||
|
||||
ex->errorMessage = QString(*utf8Value);
|
||||
|
||||
auto exceptionValue = tryCatch.Exception();
|
||||
ex->thrownValue = ScriptValue(new ScriptValueV8Wrapper(this, V8ScriptValue(this, exceptionValue)));
|
||||
|
||||
|
||||
v8::Local<v8::Message> exceptionMessage = tryCatch.Message();
|
||||
if (!exceptionMessage.IsEmpty()) {
|
||||
ex->errorLine = exceptionMessage->GetLineNumber(getContext()).FromJust();
|
||||
|
|
Loading…
Reference in a new issue