Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] C# question -- try / catch / finally



On Thu, Nov 21, 2013 at 5:53 PM, Godwin Stewart <gstewart@example.com> wrote:
If the finally block is executed in both cases, whether the exception is
thrown or not, what is the point in having a special construct for it at
all? Surely this is functionally equivalent:

try {
  doSomething();
  doSomethingElse();
  areWeDoneAlready();
}
catch (SomeKindOfException) {
  kaboom();
}
cleanup();

Is there any type of circumstance where a finally block actually brings
something to the table?

What if AnotherException is raised?

br.


--
2 + 2 = 5, for very large values of 2.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links