What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 6692 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > how to skip the catch exception and continue the process ...
Kavi.Sirius

how to skip the catch exception and continue the process

Replies: 15 | Posted by: Kavi.Sirius on 5/30/2012 | Category: C# Forums | Views: 1360 | Status: [Member] | Points: 10  


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


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/30/2012 2:42:25 AM
Level: Silver | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/30/2012 2:54:43 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/30/2012 4:52:21 AM
Level: Silver | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/30/2012 5:04:57 AM
Level: Starter | Status: [Member] | Points: 25

thank u for ur kind replies

Regards
Kavi.n

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

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/30/2012 5:06:39 AM
Level: Silver | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/30/2012 6:13:13 AM
Level: Silver | Status: [Member] | Points: 25

On Error Resume Next option also not a good practice.

Regards,
Singaravel M

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

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/30/2012 6:50:18 AM
Level: Starter | Status: [Member] | Points: 25

yes ,but this functionallty not in c#.net

Regards
Kavi.n

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

Sabarimahesh
Sabarimahesh  
Posted on: 5/30/2012 8:41:08 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 5/30/2012 8:42:14 AM
Level: Bronze | Status: [Member] | Points: 25

   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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 5/30/2012 8:42:53 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 5/30/2012 8:43:13 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 5/30/2012 8:43:51 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sakthi.Singaravel
Sakthi.Singaravel  
Posted on: 5/30/2012 11:33:28 AM
Level: Silver | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 5/31/2012 12:25:49 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 5/31/2012 2:20:06 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/26/2013 3:57:44 AM