-
January 31st, 2013, 07:31 AM
#1
Try Catch , is it enough to prevent crash and error messages ?
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
Code:
Try {
function1();
function2();
}
It will handle the two functions ? or i have to put Try Catch inside functions like this
Code:
void function1() {
Try { }
}
Thanks !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|