Hi all. I have a method involving several statements, none of which are dependent on any other. Basically I am simply setting a bunch of properties, one after the other, and want to essentially ignore exceptions on a per-line basis throughout this block. In other words, if an exception occurs, I only want that line to be skipped and execution continue on the next, just as if I had this:
- void method() {
-
try { NonCriticalOperation(); } catch { }
-
try { NonCriticalOperation(); } catch { }
-
try { NonCriticalOperation(); } catch { }
-
try { NonCriticalOperation(); } catch { }
-
try { NonCriticalOperation(); } catch { }
-
}
...but without having to write a million try/catch statements.
Anyone know of an attribute or keyword that can do this?