事件:'messageerror'


【Event: 'messageerror'

当反序列化消息失败时,会触发 'messageerror' 事件。

【The 'messageerror' event is emitted when deserializing a message failed.】

目前,当在接收端实例化已发送的 JS 对象时发生错误时,会触发此事件。这种情况很少见,但可能会发生,例如,当在 vm.Context 中接收到某些 Node.js API 对象时(此时 Node.js API 当前不可用)。

【Currently, this event is emitted when there is an error occurring while instantiating the posted JS object on the receiving end. Such situations are rare, but can happen, for instance, when certain Node.js API objects are received in a vm.Context (where Node.js APIs are currently unavailable).】