<p><strong>I do not currently have this issue</strong>, but you never know, and thought experiments are always fun.</p>

<p><strong>Ignoring the obvious problems that you would have to have with your architecture to even be attempting this</strong>, let's assume that you had some horribly-written code of someone else's design, and you needed to do a bunch of wide and varied operations in the same code block, e.g.:</p>

<pre><code>WidgetMaker.SetAlignment(57);
contactForm["Title"] = txtTitle.Text;
Casserole.Season(true, false);
((RecordKeeper)Session["CasseroleTracker"]).Seasoned = true;
</code></pre>

<p>Multiplied by a hundred.  Some of these might work, others might go badly wrong.  What you need is the C# equivalent of "on error resume next", otherwise you're going to end up copying and pasting try-catches around the many lines of code.</p>

<p>How would you attempt to tackle this problem?</p>

```
On Error Resume Next
```
is a really bad idea in the C# world. Nor would adding the equivalent to
```
On Error Resume Next
```
actually help you. All it would do is leave you in a bad state which could cause more subtle errors, data loss and possibly data corruption.
But to give the questioner his due, you could add a global handler and check the TargetSite to see which method borked. Then you could at least know what line it borked on. The next part would be to try and figure out how to set the "next statement" the same way the debugger does it. Hopefully your stack won't have unwound at this point or you can re-create it, but it's certainly worth a shot. However, given this approach the code would have to run in Debug mode every time so that you would have your debug symbols included.