Converted 1 stray 'console.error' call to an event emission.