Hello i want to make a simple program that will collect some stats from a local database and then it will email them every 30 minutes to my email address.

I want to be sure that the program will run without crashing so i believe Try Catch is what i want but i dont know if im right.

For example if the pc is not connected to the internet and my program cant communicate with mail.server.com the program will crash , but if i use Try Catch it will execute the Catch code.

Is there any need to have nested Try Catch or one is enough for multiple functions ? For example

Try {


It will handle the two functions ? or i have to put Try Catch inside functions like this

void function1() {

Try { } 

Thanks !