Add error event support.