How to throw an caught exception from cath block?

Answer Posted / gustav bouwer

This (as above) will re throw the exception.

catch (Exception e)
{
throw e;
}

This passes along the ORIGINAL exception so you keep your
stack trace.
catch (Exception e)
{
throw;
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between a namespace and assembly name in .net?

503


What is static classes?

490


How many types of constructors are there in c#?

472


What is razor view in c#?

448


What can we do to handle multiple exceptions?

556






What is a service layer c#?

471


Explain the difference between directcast and ctype.

457


Is it possible to nest cfml conditional tags?

544


Why are strings immutable c#?

471


What is the difference between arraylist and list in c#?

460


What is private constructor c#?

502


What are extensions in c#?

540


What is the use of system.environment class in c#.net?

525


Illustrate the process of code compilation in c#?

527


Is array thread safe c#?

482