fix #6: send error event on caught exceptions