add onException handler