how to skip the catch exception and continue the process

Posted by Kavi.Sirius under C# on 5/30/2012 | Points: 10 | Views : 11035 | Status : [Member] | Replies : 15
hi

Normally the web application contains the try,catch for all functions

if any exceptions are occurred it will show in catch, but it stops the entire application process

but i need to skip the catch exception and continue the process in application

how can i do in c#.net

Thanks in advance,

Regards
Kavi.n



Responses

Posted by: Sakthi.Singaravel on: 5/30/2012 [Member] Silver | Points: 25

Up
0
Down
if u know the possible exception place and u don't need exception msg means,

try
{
//code - which code u need not exception
}
catch(Exception e)
{
//don't put anything here
}
//your remaining code


Regards,
Singaravel M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kavi.Sirius on: 5/30/2012 [Member] Starter | Points: 25

Up
0
Down
hi singaravel,

i need to catch the all exception and write in one text file

my problem after the catch is arised means the entire process will stop
but i need to continue the applications

Regards
Kavi.n

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/30/2012 [Member] Silver | Points: 25

Up
0
Down
Sorry madam, In my knowledge its not possible..

Hi to all,

If u know above query post ur suggesstion..

Regards,
Singaravel M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kavi.Sirius on: 5/30/2012 [Member] Starter | Points: 25

Up
0
Down
thank u for ur kind replies

Regards
Kavi.n

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/30/2012 [Member] Silver | Points: 25

Up
0
Down
In VB and VB .NET has On Error Resume Next option.

These methods are still available in VB.NET, but they are not part of C#.

Regards,
Singaravel M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/30/2012 [Member] Silver | Points: 25

Up
0
Down
On Error Resume Next option also not a good practice.

Regards,
Singaravel M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kavi.Sirius on: 5/30/2012 [Member] Starter | Points: 25

Up
0
Down
yes ,but this functionallty not in c#.net

Regards
Kavi.n

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/30/2012 [Member] Bronze | Points: 25

Up
0
Down
Then Y U Using the Try Catch


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/30/2012 [Member] Bronze | Points: 25

Up
0
Down
   catch (Exception e)

{
//This happens, we don't care!
}


leave it Like this

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/30/2012 [Member] Bronze | Points: 25

Up
0
Down
You Need To Mention Catch Block,,,,

No Need iNside Catch Block

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/30/2012 [Member] Bronze | Points: 25

Up
0
Down
I Hope that You May Get Helpful

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/30/2012 [Member] Bronze | Points: 25

Up
0
Down
HitTestResult result;

try
{
result = this.HitTest( e.X, e.Y, ChartElementType.DataPoint);
}
catch(Exception e)
{
#if !DEBUG
//This happens, we don't care!
#endif
}


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/30/2012 [Member] Silver | Points: 25

Up
0
Down
Refer this link, it may be use for u...!

http://www.dotnetobject.com/Thread-Global-Exception-Handling-in-ASP-NET?action=lastpost

Regards,
Singaravel M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kavi.Sirius on: 5/31/2012 [Member] Starter | Points: 25

Up
0
Down
hi sabarimahesh,

i need to catch the all exception in application and write in one text file

my problem after the catch is arised means the entire process will stop
but i need to continue the applications

Regards
Kavi.n

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/31/2012 [Member] Bronze | Points: 25

Up
0
Down
Kavi.Sirius

Pleae Send the Code

Only Catch part ....

i'll say The Solution .....




Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response