c# - Try-catch every line of code without individual try-catch blocks -


i not have issue, never know, , thought experiments fun.

ignoring obvious problems have have architecture attempting this, let's assume had horribly-written code of else's design, , needed bunch of wide , varied operations in same code block, e.g.:

widgetmaker.setalignment(57); contactform["title"] = txttitle.text; casserole.season(true, false); ((recordkeeper)session["casseroletracker"]).seasoned = true; 

multiplied hundred. of these might work, others might go badly wrong. need c# equivalent of "on error resume next", otherwise you're going end copying , pasting try-catches around many lines of code.

how attempt tackle problem?

it's pretty obvious you'd write code in vb.net, have on error resume next, , export in dll c#. else being glutton punishment.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -