Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i catch exceptions while updating datas?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00858100
Message ID:
00860920
Vues:
22
Nuri,

>When i catch an exception;
>1- application warns the end-user for correction.
>2- application tries to solve the problem by itself.
>3- if it's a server object throws exception in order to let the client handle it by itself.
>
>when i can't catch those exceptions;
>application shuts down immediately, this behaviour is not acceptable for professional applications.

Actually, this is the recommended behavior for Frameworks. With a few exceptions Frameworks don't know enough about what causes an error to decide what to do about it. Some "exceptions" to this rule are data access exceptions, such as concurrency conflicts, and so on. You can catch Framework exceptions by overriding the method that contains the code that causes the exception...for example, SaveDataSet() in a business object method. If an error can't be handled at the Framework or application level then the best thing to do is to shut down the application because the environment has become unstable.

That said, is there a particular exception that is being thrown that you want to catch?

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform