Change emit to emit_error in error callback
Merge pull request #2 from WuLonghui/hw-issue-4

Change emit to emit_error in error callback