add code
Update exception logic