catch html event errors