Add rpc error for ELECTRON_BROWSER_MEMBER_GET
This commit is contained in:
parent
88809b0e0b
commit
996ddba715
1 changed files with 5 additions and 0 deletions
|
@ -363,6 +363,11 @@ ipcMain.on('ELECTRON_BROWSER_MEMBER_SET', function (event, id, name, value) {
|
|||
ipcMain.on('ELECTRON_BROWSER_MEMBER_GET', function (event, id, name) {
|
||||
try {
|
||||
let obj = objectsRegistry.get(id)
|
||||
|
||||
if (obj == null) {
|
||||
throwRPCError(`Cannot get property '${name}' on missing remote object ${id}`)
|
||||
}
|
||||
|
||||
event.returnValue = valueToMeta(event.sender, obj[name])
|
||||
} catch (error) {
|
||||
event.returnValue = exceptionToMeta(error)
|
||||
|
|
Loading…
Add table
Reference in a new issue