Browse Source

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 <[email protected]>
Ahmed Elshafey 4 years ago
parent
commit
272611cc82
1 changed files with 5 additions and 0 deletions
  1. 5 0
      docs/api/ipc-main.md

+ 5 - 0
docs/api/ipc-main.md

@@ -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