Click here to Skip to main content
15,925,602 members
Home / Discussions / C#
   

C#

 
QuestionThrow Exception - how expensive is it really? Pin
elguaro12-Oct-04 14:51
elguaro12-Oct-04 14:51 
AnswerRe: Throw Exception - how expensive is it really? Pin
Christian Graus12-Oct-04 15:36
protectorChristian Graus12-Oct-04 15:36 
GeneralRe: Throw Exception - how expensive is it really? Pin
elguaro12-Oct-04 17:11
elguaro12-Oct-04 17:11 
GeneralRe: Throw Exception - how expensive is it really? Pin
Stefan Troschuetz12-Oct-04 20:48
Stefan Troschuetz12-Oct-04 20:48 
GeneralRe: Throw Exception - how expensive is it really? Pin
Christian Graus13-Oct-04 9:01
protectorChristian Graus13-Oct-04 9:01 
GeneralRe: Throw Exception - how expensive is it really? Pin
elguaro13-Oct-04 13:27
elguaro13-Oct-04 13:27 
GeneralRe: Throw Exception - how expensive is it really? Pin
Christian Graus14-Oct-04 9:14
protectorChristian Graus14-Oct-04 9:14 
GeneralRe: Throw Exception - how expensive is it really? Pin
elguaro14-Oct-04 16:55
elguaro14-Oct-04 16:55 
Well we obviously work in very different environments. I have 3 years working in the Government (in Australia this is) and documentation is not that good. It doesn't exists really. And from what I've seen, developers do forget to catch exceptions or simply choose to ignore them. These are people
who are learning OO with C# and if the compiler doesn't force you to catch the exception you just don't do it. Even if you do your testing and the testing team do their thing afterwards, for some strange reason in my "real world" no matter how much testing you do, you can only expect the unexcepted in production. Then you get a stupid error that you could have had a chance of recovering from had you caught it. Mad | :mad:

Christian Graus wrote:
Any problem that doesn't come up in your obviously extensive testing/unit tests is going to be esoteric at best, and it's still better that you find out about it

Frustrations aside Big Grin | :-D , just knowing that an error occurred is not good enough when you could have dealt with it and (why not!) recover. And no matter how extensive your testing is, sh*t will happen. You should assume it will too.

Christian Graus wrote:
if you think about what you're asking a function to do, and/or read the docs, you should have a fair idea what exceptions are likely to be thrown

Disagree. You shoudn't try to infer what exceptions are likely to be thrown just by looking at a method's name. You'd be implying implementation details.
GeneralRe: Throw Exception - how expensive is it really? Pin
Christian Graus17-Oct-04 9:51
protectorChristian Graus17-Oct-04 9:51 
GeneralRe: Throw Exception - how expensive is it really? Pin
elguaro17-Oct-04 14:00
elguaro17-Oct-04 14:00 
GeneralRe: Throw Exception - how expensive is it really? Pin
Nemanja Trifunovic17-Oct-04 14:54
Nemanja Trifunovic17-Oct-04 14:54 
GeneralMedia Player SDK Pin
Christian Graus12-Oct-04 14:47
protectorChristian Graus12-Oct-04 14:47 
GeneralNot an answer, but an alternative. Pin
Matt Philmon12-Oct-04 18:02
Matt Philmon12-Oct-04 18:02 
GeneralRe: Media Player SDK Pin
Dave Kreskowiak12-Oct-04 18:11
mveDave Kreskowiak12-Oct-04 18:11 
GeneralRe: Media Player SDK Pin
Christian Graus13-Oct-04 9:05
protectorChristian Graus13-Oct-04 9:05 
GeneralDatagrid and Datatable and sorting, Winform Pin
Matt Philmon12-Oct-04 11:53
Matt Philmon12-Oct-04 11:53 
QuestionHow to specify HOSTNAME in sql connection string Pin
Darryl Borden12-Oct-04 10:11
Darryl Borden12-Oct-04 10:11 
GeneralRe: How to specify HOSTNAME in sql connection string Pin
Heath Stewart12-Oct-04 10:59
protectorHeath Stewart12-Oct-04 10:59 
QuestionCan anyone tell me whether this is right or wrong..? Pin
Kiran Satish12-Oct-04 10:04
Kiran Satish12-Oct-04 10:04 
AnswerRe: Can anyone tell me whether this is right or wrong..? Pin
Christian Graus12-Oct-04 10:46
protectorChristian Graus12-Oct-04 10:46 
GeneralRe: Can anyone tell me whether this is right or wrong..? Pin
Kiran Satish12-Oct-04 13:34
Kiran Satish12-Oct-04 13:34 
GeneralRe: Can anyone tell me whether this is right or wrong..? Pin
Kiran Satish13-Oct-04 19:33
Kiran Satish13-Oct-04 19:33 
GeneralWord documents to PDF in C## Pin
house12-Oct-04 9:53
house12-Oct-04 9:53 
GeneralRe: Word documents to PDF in C## Pin
Christian Graus12-Oct-04 10:47
protectorChristian Graus12-Oct-04 10:47 
GeneralImage Rotation Pin
ahmadzafar12-Oct-04 9:52
ahmadzafar12-Oct-04 9:52 

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.