Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exception or return boolean?
Message
De
09/01/2009 21:53:14
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
09/01/2009 19:37:14
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01372501
Message ID:
01372507
Vues:
17
>HI,
>May I know any guideline to decide when to throw exception instead of return boolean from method, especially in business rules checking?
>
>Thank you

In most, if not all, cases you should throw an exception instead of returning a boolean or status.
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform