Versions des environnements
>Thanks for the input. I have started using exceptions instead of error codes. >They seem to work much better. I have read where it is slower and error codes >should be used, but that doesn't seem to be the popular opinion.
They just seem?:) I hated asp x.0 (classic) for that particular reason.
You are going to appreciate exceptions more if you do Oracle PL/SQL instead of T-SQL.
Build your own exceptions for domain logic.
When catching try to catch starting with the most specific one rather than Exception ex.
Use finally for closing resources.
When I build classes/components that are used by other folks, I throw mostly domain exceptions and then the caller should be dealing with catching the exceptions and rethrowing them.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement