Parse setting response to surface thrown errors
This commit is contained in:
parent
257f6b142f
commit
e85e483c71
1 changed files with 6 additions and 1 deletions
|
@ -139,7 +139,12 @@ const setObjectMembers = function (ref, object, metaId, members) {
|
||||||
// Only set setter when it is writable.
|
// Only set setter when it is writable.
|
||||||
if (member.writable) {
|
if (member.writable) {
|
||||||
descriptor.set = function (value) {
|
descriptor.set = function (value) {
|
||||||
ipcRenderer.sendSync('ELECTRON_BROWSER_MEMBER_SET', metaId, member.name, value)
|
const meta = ipcRenderer.sendSync('ELECTRON_BROWSER_MEMBER_SET', metaId, member.name, value)
|
||||||
|
// Meta will be non-null when a setter error occurred so parse it
|
||||||
|
// to a value so it gets re-thrown.
|
||||||
|
if (meta != null) {
|
||||||
|
metaToValue(meta)
|
||||||
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue