In C# try -catch , can't catch the exception?

Yes it will catch the exception even know it is thrown from within another function that you are calling.

Yes it will catch the exception even know it is thrown from within another function that you are calling. Either the exception isn't being thrown, or you aren't detecting properly that the exception is caught, maybe put a breakpoint at both places.

If the ExistFreeSubscription function causes a stack overflow, it won't be caught. Also, it's possible for the function to throw an exception object that doesn't inherit from System. Exception (this is possible in other languages, it's not CLS compliant).

Catch (Exception ex) won't catch such kind of exceptions (a catch { } block can catch exception objects even if they are not inherited from System. Exception).

That should work, I would look closer at your . ExistFreeSubscription() method, to see why it's not returning true.

If (bizNTx. ExistFreeSubscription(buyerID, itemNo)) { throw new Exception("Exception. "); } If bizNTx.

ExistFreeSubscription returns false, then it looks like your Exception won't be thrown.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions