How to wrap a set of already written functions in try-catch ?
Maybe there are some automation tools? I’ll have to do this manually for a long time.
You can use the function Surround with
SHIFT + CTRL + ACTRL + K, CTRL+STTab or Enter . And the code will be wrapped in a try/catc h block. Actually it turns out quickly, try it.Or look towards AOP and use libraries like PostSharp . Also saw an extension for the studio, but I do not remember the name.
Source: https://ru.stackoverflow.com/questions/75778/
All Articles