docs: Update ipcMain.handle() docs in ipc-main.md for error-handling details (#27461)

* Update ipc-main.md

Include information about ipcMain.handle() error handling and workaround included in issue #24427

* Update ipc-main.md

fixed a typo

* Update ipc-main.md

Remove the exception passing workaround from ipcMain.handle() and refer to open issue only.

* Remove trailing spaces

Co-authored-by: Cheng Zhao <github@zcbenz.com>
This commit is contained in:
Ahmed Elshafey 2021-02-02 14:22:20 +02:00 committed by GitHub
parent b6df7cd327
commit 272611cc82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,11 @@ The `event` that is passed as the first argument to the handler is the same as
that passed to a regular event listener. It includes information about which
WebContents is the source of the invoke request.
Errors thrown through `handle` in the main process are not transparent as they
are serialized and only the `message` property from the original error is
provided to the renderer process. Please refer to
[#24427](https://github.com/electron/electron/issues/24427) for details.
### `ipcMain.handleOnce(channel, listener)`
* `channel` String