modified exception handle