Add note about custom errors
This commit is contained in:
parent
83477cfe37
commit
8f2bb9c861
1 changed files with 14 additions and 0 deletions
|
@ -271,6 +271,20 @@ export async function computeTextEmbedding(
|
|||
|
||||
// -
|
||||
|
||||
/**
|
||||
* [Note: Custom errors across Electron/Renderer boundary]
|
||||
*
|
||||
* We need to use the `message` field to disambiguate between errors thrown by
|
||||
* the main process when invoked from the renderer process. This is because:
|
||||
*
|
||||
* > Errors thrown throw `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.
|
||||
* >
|
||||
* > - https://www.electronjs.org/docs/latest/tutorial/ipc
|
||||
* >
|
||||
* > Ref: https://github.com/electron/electron/issues/24427
|
||||
*/
|
||||
/* preload: duplicated CustomErrors */
|
||||
const CustomErrorsP = {
|
||||
WINDOWS_NATIVE_IMAGE_PROCESSING_NOT_SUPPORTED:
|
||||
|
|
Loading…
Add table
Reference in a new issue