- Add an Exception type check to the error handling