I have read and discussed the following questions and articles deeply and many others now and in the past:
Main method code entirely inside try/catch: Is it bad practice?
I will make this article the coding standard of exception handling in my organization! avery nice one but didn't answer me: http://www.codeproject.com/Articles/9538/Exception-Handling-Best-Practices-in-NET
What is the Best practice for try catch blocks to create clean code?
Best practices for exception management in Java or C# Here: I didn't like this statment :( You should not try to catch each and every exception in every possible place.
Should multiple Try/Catch blocks in a method be combined
I have a problem when i need to decide to enclose some block of code with try-catch statement, I know that the code should be enclosed is the faulty code, And i must check what I can check, but for example: I need to write a line in some text file, I should check if the file is exists, and if I have permission to write on it, should I check if there is a space on the disk, or the disk is writable, and if i checked the space, what if something happened while I writing the file (Some other app or thread used the space, or the removable drive has been removed?), Is it a best practice if I checked those things and handled IOException and SecurityException and other potential exceptions, or I should only check without try-catch?
Another example: I am using EntityFramework to access database, when accessing something may contact the database, I know I should check the connection if closed and try to open it, but there are many and many things may cause a failure in this statement, the database may be on a removable drive, this drive may be removed while reading, the service of the DBMS may stop for any reason, no space exception may be thrown, the scheme of the database may change after I try to execute my code for some **** reason,How can I prevent my code from fail, can I just check every thing I can check, and go on? or I should use try catch for exception I can expect even though I have checked them?
Give me references of your answers please, not a general answers!
EDIT
And sure read this : http://msdn.microsoft.com/en-us/library/seyhszts.aspx