Click here to Skip to main content
15,925,895 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to add Microsoft Word features to .Net application Pin
ugs197813-Nov-07 20:24
ugs197813-Nov-07 20:24 
AnswerRe: How to add Microsoft Word features to .Net application Pin
DigiOz Multimedia14-Nov-07 11:49
DigiOz Multimedia14-Nov-07 11:49 
QuestionAbout RowDataBound Pin
geeta pavate13-Nov-07 20:19
geeta pavate13-Nov-07 20:19 
QuestionTo use or not to use exceptions? Which is the preferred approach? Pin
boinske13-Nov-07 16:22
boinske13-Nov-07 16:22 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
ugs197813-Nov-07 20:34
ugs197813-Nov-07 20:34 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Urs Enzler13-Nov-07 21:33
Urs Enzler13-Nov-07 21:33 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Colin Angus Mackay14-Nov-07 23:21
Colin Angus Mackay14-Nov-07 23:21 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Pete O'Hanlon15-Nov-07 0:16
mvePete O'Hanlon15-Nov-07 0:16 
Colin makes excellent points, and I want to add to them.

If you rely on return statuses, then you have introduced a weakness into the system whereby further processing can be performed on values from your widget because the system consuming your widget has chosen to ignore statuses. Return values tended to be used by systems that existed before SEH (structured exception handling).

One argument that you will sometimes hear is that you can do the same as above by wrapping the code in a try/catch block and then ignore the fact that you received an error and continue processing with incorrect values. This is true, but misses the point that the developer has chosen to ignore the exception. They are aware it exists, but they are doing nothing with it - this is a deliberate choice and not an omission.

The simple fact is - an exception exists to show that something Exceptional has occurred (i.e. something outside the norm). If your inputs don't conform to expected values, then this is Exceptional processing.

One thing that hasn't been mentioned is testing. It's reasonable to assume that people who are using your component perform their own testing. As long as you've documented the conditions that can lead to the exceptions, then you give the consumers of the component a chance to develop their own tests. It can help to give them a hint as to areas where their code might go wrong.

Deja View - the feeling that you've seen this post before.

AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
mabo4215-Nov-07 6:55
mabo4215-Nov-07 6:55 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
PIEBALDconsult19-Nov-07 14:04
mvePIEBALDconsult19-Nov-07 14:04 
QuestionMSBuild - Building multiple projects Pin
Simon P Stevens13-Nov-07 5:06
Simon P Stevens13-Nov-07 5:06 
AnswerRe: MSBuild - Building multiple projects Pin
Scott Dorman13-Nov-07 12:45
professionalScott Dorman13-Nov-07 12:45 
GeneralRe: MSBuild - Building multiple projects Pin
Simon P Stevens15-Nov-07 1:39
Simon P Stevens15-Nov-07 1:39 
QuestionForm above another Form, but not TopMost? Pin
AndrewVos13-Nov-07 2:47
AndrewVos13-Nov-07 2:47 
AnswerRe: Form above another Form, but not TopMost? Pin
Luc Pattyn13-Nov-07 3:16
sitebuilderLuc Pattyn13-Nov-07 3:16 
GeneralRe: Form above another Form, but not TopMost? Pin
AndrewVos13-Nov-07 3:20
AndrewVos13-Nov-07 3:20 
QuestionReference of VB6 COM & Activex components in VB.net setup : Need urgent help [modified] Pin
nishkarsh_k12-Nov-07 23:46
nishkarsh_k12-Nov-07 23:46 
AnswerRe: Reference of VB6 COM & Activex components in VB.net setup : Need urgent help Pin
Paul Conrad13-Nov-07 13:01
professionalPaul Conrad13-Nov-07 13:01 
AnswerRe: Reference of VB6 COM & Activex components in VB.net setup : Need urgent help Pin
DigiOz Multimedia13-Nov-07 13:27
DigiOz Multimedia13-Nov-07 13:27 
QuestionLogonUserA API always throws 1326 (Incorrect Username and Password) Pin
Vasudevan Deepak Kumar12-Nov-07 22:48
Vasudevan Deepak Kumar12-Nov-07 22:48 
QuestionInstaller issue vb2005 : Need urgent help Pin
nishkarsh_k12-Nov-07 20:24
nishkarsh_k12-Nov-07 20:24 
AnswerRe: Installer issue vb2005 : Need urgent help Pin
Michael Sync12-Nov-07 20:35
Michael Sync12-Nov-07 20:35 
GeneralRe: Installer issue vb2005 : Need urgent help Pin
nishkarsh_k12-Nov-07 21:57
nishkarsh_k12-Nov-07 21:57 
Questionodp.net error Pin
umashankergr812-Nov-07 10:07
umashankergr812-Nov-07 10:07 
AnswerRe: odp.net error Pin
Pete O'Hanlon12-Nov-07 21:59
mvePete O'Hanlon12-Nov-07 21:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.