KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When writing a C# application whose #1 priority is to never crash , how often should I used a try-catch block? Can I encapsulate all the statements in a method in try-catch blocks? public void SomeMethod() { try { // entire contents of the function // library calls // function calls // variable initialization .. etc } catch (Exception e) { // recover } } What are the downsides to wrapping everything in try-catch blocks?
Tags (comma-separated)
Save Edits
Cancel