chore: misc cleanup (#16037)

This commit is contained in:
Milan Burda 2018-12-12 22:31:16 +01:00 committed by Charles Kerr
parent 1152fecb75
commit c65a0d90b8
5 changed files with 17 additions and 20 deletions

View file

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