Can we throw exception from catch Block?

Answers were Sorted based on User's Feedback



Can we throw exception from catch Block?..

Answer / swaroop

Yes, we can.

Is This Answer Correct ?    62 Yes 6 No

Can we throw exception from catch Block?..

Answer / deepika

The above answer is wrong.We can absolutely throw
exceptions in catch blocks.This is called bubbling the
exceptions to one level higher.If catch block can not
handle exceptions,then it can throw the exception that it
caught, to it's caller

Is This Answer Correct ?    46 Yes 1 No

Can we throw exception from catch Block?..

Answer / devender kumar

Yes. we can throw the exception from the catch block.
If anyone have confusion then try this code:


protected void Button1_Click(object sender, EventArgs e)
{
try
{
Test();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
private void Test()
{
try
{
throw new Exception("Dev");
}
catch (Exception ex)
{
throw ex;
}
}

Is This Answer Correct ?    40 Yes 2 No

Can we throw exception from catch Block?..

Answer / manee

we can throw the exception in catch block by using throw New
Exception("Exception Message")

Is This Answer Correct ?    24 Yes 2 No

Can we throw exception from catch Block?..

Answer / kakarala sowjanya

You can catch exceptions when the purpose of catching the
exception is to re-throw or transfer the exception to a
different thread. so we can throw exception from catch block

Is This Answer Correct ?    22 Yes 1 No

Can we throw exception from catch Block?..

Answer / kamlesh sharma

yes we can through exception If catch block can not
handle exceptions,then it throw the exception to it's
caller

Is This Answer Correct ?    16 Yes 2 No

Can we throw exception from catch Block?..

Answer / progguru

yes

Is This Answer Correct ?    16 Yes 2 No

Can we throw exception from catch Block?..

Answer / rajesh.pinninty

Exception is thrown by catch block

Is This Answer Correct ?    4 Yes 4 No

Can we throw exception from catch Block?..

Answer / subbarao

i think answer is NO, because catch block is used to catch
the exceptions thrown

Is This Answer Correct ?    9 Yes 69 No

Post New Answer

More ASP.NET Interview Questions

Name and describe some HTTP Status Codes and what they express to the requesting client ?

1 Answers  


Web API uses which library for JSON serialization?

0 Answers  


How do you make your site SSL enabled ?

3 Answers   Satyam,


About writting a query and SP which is better ?

5 Answers   Abacus, Satyam,


Explain about secure socket layer?

0 Answers  






can any one explain about 3-tier architecture and how to deploy 3 layers of 3-tier architecture in 3 different servers.plz send me .net code

1 Answers   Wipro,


Explain About WebService

0 Answers   BirlaSoft,


In which interface the template of any control like Gridview would Initiate?

2 Answers  


what is asp.net

12 Answers   Dynacs,


What is the asp.net mvc folder conventions? : asp.net mvc

0 Answers  


How to configure a website without using IIS.

3 Answers   CGI,


What is FullTrust? Do GACed assemblies have FullTrust?

2 Answers  


Categories