We are working on a Project where we check the internet connectivity and we need to handle exceptions

hello everybuddy , i got the solution . thank u so much.