What is exception handling useful for?