chore: misc cleanup (#16037)
This commit is contained in:
parent
1152fecb75
commit
c65a0d90b8
5 changed files with 17 additions and 20 deletions
|
@ -138,7 +138,7 @@ const plainObjectToMeta = function (obj) {
|
|||
}
|
||||
|
||||
// Convert Error into meta data.
|
||||
const exceptionToMeta = function (sender, contextId, error) {
|
||||
const exceptionToMeta = function (error) {
|
||||
return {
|
||||
type: 'exception',
|
||||
value: errorUtils.serialize(error)
|
||||
|
@ -275,7 +275,7 @@ const handleRemoteCommand = function (channel, handler) {
|
|||
try {
|
||||
returnValue = handler(event, contextId, ...args)
|
||||
} catch (error) {
|
||||
returnValue = exceptionToMeta(event.sender, contextId, error)
|
||||
returnValue = exceptionToMeta(error)
|
||||
}
|
||||
|
||||
if (returnValue !== undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue