Click here to Skip to main content
15,885,365 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Driver development help & tips Pin
Richard MacCutchan18-May-12 21:56
mveRichard MacCutchan18-May-12 21:56 
GeneralRe: Driver development help & tips Pin
Brandon-X1200018-May-12 22:12
Brandon-X1200018-May-12 22:12 
GeneralRe: Driver development help & tips Pin
Richard MacCutchan19-May-12 0:31
mveRichard MacCutchan19-May-12 0:31 
GeneralRe: Driver development help & tips Pin
«_Superman_»19-May-12 17:37
professional«_Superman_»19-May-12 17:37 
GeneralRe: Driver development help & tips Pin
Erudite_Eric20-May-12 21:37
Erudite_Eric20-May-12 21:37 
GeneralRe: Driver development help & tips Pin
Brandon-X1200020-May-12 22:49
Brandon-X1200020-May-12 22:49 
GeneralRe: Driver development help & tips Pin
Erudite_Eric20-May-12 23:02
Erudite_Eric20-May-12 23:02 
QuestionBest way to handle errors (esp. in games) Pin
forkbomber18-May-12 11:15
forkbomber18-May-12 11:15 
I am currently writing a game in C++ using OpenGL and I wonder which is the best way to deal with errors, once they occur (especially in games).
Note: I am currently using possibility 2, but I'm not really happy with it.

1. Exceptions - At first glance they seem to be the perfect for all kinds of errors, but I found out that exceptions can produce heck of a lot of overhead and extra time cost and IMO they're making the code ugly.

2. Return values - It's said that checking success using return values is deprecated since C++'s built-in exception handling. I can't share that opinion, but retrieving a return value and checking it doesn't seem to be an 'elegant' way of doing this and isn't beautiful as well (due to thousands of if and/or switch statements.

3. Return value + global error indicator - This one's really deprecated, even though I somehow liked the errno thingy in C Smile | :)

So, what do you use/what would you use and what would you recommend for my needs?

Thanks in advance.

PS: Do I have some kind of natural aversion to exceptions or are they really not the greatest invention since sliced bread?
AnswerRe: Best way to handle errors (esp. in games) Pin
TomasRiker218-May-12 13:23
TomasRiker218-May-12 13:23 
GeneralRe: Best way to handle errors (esp. in games) Pin
Stefan_Lang21-May-12 23:54
Stefan_Lang21-May-12 23:54 
AnswerRe: Best way to handle errors (esp. in games) Pin
David Crow18-May-12 16:19
David Crow18-May-12 16:19 
GeneralRe: Best way to handle errors (esp. in games) Pin
charlieg21-May-12 5:50
charlieg21-May-12 5:50 
GeneralRe: Best way to handle errors (esp. in games) Pin
David Crow21-May-12 5:59
David Crow21-May-12 5:59 
AnswerRe: Best way to handle errors (esp. in games) Pin
Aescleal18-May-12 22:39
Aescleal18-May-12 22:39 
GeneralRe: Best way to handle errors (esp. in games) Pin
forkbomber18-May-12 23:34
forkbomber18-May-12 23:34 
AnswerRe: Best way to handle errors (esp. in games) Pin
Stefan_Lang22-May-12 0:12
Stefan_Lang22-May-12 0:12 
QuestionUnable to write into Shared memory Pin
manoharbalu18-May-12 1:26
manoharbalu18-May-12 1:26 
AnswerRe: Unable to write into Shared memory Pin
TomasRiker218-May-12 2:27
TomasRiker218-May-12 2:27 
GeneralRe: Unable to write into Shared memory Pin
zhaolei.cpp@gmail.com18-May-12 3:53
zhaolei.cpp@gmail.com18-May-12 3:53 
GeneralRe: Unable to write into Shared memory Pin
zhaolei.cpp@gmail.com18-May-12 4:05
zhaolei.cpp@gmail.com18-May-12 4:05 
QuestionGetItemDataPtr (ComboBox) Not Working For Me Pin
AmbiguousName18-May-12 1:13
AmbiguousName18-May-12 1:13 
AnswerRe: GetItemDataPtr (ComboBox) Not Working For Me Pin
TomasRiker218-May-12 2:29
TomasRiker218-May-12 2:29 
GeneralRe: GetItemDataPtr (ComboBox) Not Working For Me Pin
zhaolei.cpp@gmail.com18-May-12 4:09
zhaolei.cpp@gmail.com18-May-12 4:09 
QuestionRe: GetItemDataPtr (ComboBox) Not Working For Me Pin
David Crow18-May-12 2:35
David Crow18-May-12 2:35 
AnswerRe: GetItemDataPtr (ComboBox) Not Working For Me Pin
AmbiguousName18-May-12 3:42
AmbiguousName18-May-12 3:42 

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.