当错误发生时触发。'close' 事件也会紧接着该事件被触发。
'close'
Emitted when an error occurs. The 'close' event will be called directly following this event.