🔧 Alex has good ideas
This commit is contained in:
parent
cf7e9df3a0
commit
5b18bea7e3
2 changed files with 15 additions and 19 deletions
|
@ -130,13 +130,9 @@ const asyncWebFrameMethods = function (requestId, method, callback, ...args) {
|
|||
if (typeof callback === 'function') callback(result)
|
||||
resolve(result)
|
||||
} else {
|
||||
if (error && error.__ELECTRON_SERIALIZED_ERROR__) {
|
||||
let rehydratedError = error
|
||||
|
||||
if (errorConstructors[error.name]) {
|
||||
rehydratedError = new errorConstructors[error.name](error.message)
|
||||
rehydratedError.stack = error.stack
|
||||
}
|
||||
if (error.__ELECTRON_SERIALIZED_ERROR__ && errorConstructors[error.name]) {
|
||||
const rehydratedError = new errorConstructors[error.name](error.message)
|
||||
rehydratedError.stack = error.stack
|
||||
|
||||
reject(rehydratedError)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue