Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Array Pin
Sakhalean23-Jun-10 2:18
Sakhalean23-Jun-10 2:18 
AnswerRe: Array PinPopular
Maximilien23-Jun-10 2:31
Maximilien23-Jun-10 2:31 
GeneralRe: Array Pin
Richard MacCutchan23-Jun-10 3:00
mveRichard MacCutchan23-Jun-10 3:00 
GeneralRe: Array Pin
Maximilien23-Jun-10 3:56
Maximilien23-Jun-10 3:56 
AnswerRe: Array Pin
Chris Losinger23-Jun-10 3:58
professionalChris Losinger23-Jun-10 3:58 
QuestionException Handling in C++ Pin
theCPkid23-Jun-10 2:04
theCPkid23-Jun-10 2:04 
AnswerRe: Exception Handling in C++ Pin
Richard MacCutchan23-Jun-10 3:02
mveRichard MacCutchan23-Jun-10 3:02 
AnswerRe: Exception Handling in C++ Pin
Emilio Garavaglia23-Jun-10 4:47
Emilio Garavaglia23-Jun-10 4:47 
One example is the standard library itself:
A stream ask a buffer to read.
If the buffer cannot complain, throws a runtime error that the stream catches, and set its own badbit, so that further reading are discarded in advance.
Believable or not, every software using C++ streams uses exception handling, at least just because of that.
----

Going more personal, wherever you're implementing something at low level that may -in certain RARE condition or in certain WRONG USAGE- not behave correctly, you can throw an exception.
The idea is to manage all those "rare events" not in the "return chain", but at "some point enough hight", typically not necessarily to have a plai n recover, but attempt a clean exit, at least at a level that allows a clean restart.
This works great especially when tighted to technics like RAII, and self-cleaning objects.

2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


AnswerRe: Exception Handling in C++ Pin
Aescleal23-Jun-10 7:10
Aescleal23-Jun-10 7:10 
GeneralRe: Exception Handling in C++ Pin
VeganFanatic25-Jun-10 16:11
VeganFanatic25-Jun-10 16:11 
GeneralRe: Exception Handling in C++ Pin
Aescleal25-Jun-10 20:17
Aescleal25-Jun-10 20:17 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt27-Jun-10 18:13
Stephen Hewitt27-Jun-10 18:13 
GeneralRe: Exception Handling in C++ Pin
Aescleal28-Jun-10 6:09
Aescleal28-Jun-10 6:09 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt28-Jun-10 15:00
Stephen Hewitt28-Jun-10 15:00 
GeneralRe: Exception Handling in C++ Pin
theCPkid29-Jun-10 3:20
theCPkid29-Jun-10 3:20 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt1-Jul-10 14:31
Stephen Hewitt1-Jul-10 14:31 
GeneralRe: Exception Handling in C++ Pin
theCPkid1-Jul-10 17:45
theCPkid1-Jul-10 17:45 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt1-Jul-10 17:59
Stephen Hewitt1-Jul-10 17:59 
GeneralRe: Exception Handling in C++ Pin
theCPkid1-Jul-10 19:03
theCPkid1-Jul-10 19:03 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt1-Jul-10 19:38
Stephen Hewitt1-Jul-10 19:38 
GeneralRe: Exception Handling in C++ Pin
Aescleal29-Jun-10 7:01
Aescleal29-Jun-10 7:01 
GeneralRe: Exception Handling in C++ Pin
Stephen Hewitt1-Jul-10 14:17
Stephen Hewitt1-Jul-10 14:17 
GeneralRe: Exception Handling in C++ Pin
theCPkid1-Jul-10 19:06
theCPkid1-Jul-10 19:06 
AnswerRe: Exception Handling in C++ [modified] Pin
theCPkid29-Jun-10 3:11
theCPkid29-Jun-10 3:11 
QuestionCRecordset old data problem Pin
eyalle23-Jun-10 0:29
eyalle23-Jun-10 0:29 

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.