Ensure exceptions are handled