Click here to Skip to main content
15,917,320 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionis the pipe the fastest? Pin
novachen22-May-03 21:17
novachen22-May-03 21:17 
AnswerRe: is the pipe the fastest? Pin
Stuart Dootson23-May-03 0:59
professionalStuart Dootson23-May-03 0:59 
GeneralRe: is the pipe the fastest? Pin
basementman23-May-03 4:09
basementman23-May-03 4:09 
GeneralRe: is the pipe the fastest? Pin
Stuart Dootson23-May-03 5:13
professionalStuart Dootson23-May-03 5:13 
Questiondon't catch in release? Pin
novachen22-May-03 21:01
novachen22-May-03 21:01 
AnswerRe: don't catch in release? Pin
Toni7822-May-03 22:26
Toni7822-May-03 22:26 
GeneralRe: don't catch in release? Pin
jhwurmbach22-May-03 23:10
jhwurmbach22-May-03 23:10 
GeneralRe: don't catch in release? Pin
Toni7823-May-03 19:20
Toni7823-May-03 19:20 
jhwurmbach wrote:
But there is: He has written catch(...) to catch ALL exceptions!

These are the definitions for try, catch, and throw:
"The code within the try block is executed normally. In case that an exception takes place, this code must use throw keyword and a parameter to throw an exception. The type of the parameter details the exception and can be of any valid type.
We can also define a catch block that captures all the exceptions independently of the type used in the call to throw. For that we have to write three points instead of the parameter type and name accepted by catch."
You have to throw an exception because you can't just simply expect the compiler to throw every kind of exception that there is out there.
Of course you can argue and say that division by zero is a standard exception and I agree with you on that, but catch(...) doesn't catch ALL the ecxeptions unless you throw some of them. Otherwise, programs would never crash.

// Afterall I realized that even my comment lines have bugs
GeneralRe: don't catch in release? Pin
novachen24-May-03 1:50
novachen24-May-03 1:50 
GeneralRe: don't catch in release? Pin
Toni7824-May-03 18:57
Toni7824-May-03 18:57 
AnswerRe: don't catch in release? Pin
jhwurmbach22-May-03 23:08
jhwurmbach22-May-03 23:08 
GeneralRe: don't catch in release? Pin
novachen24-May-03 1:54
novachen24-May-03 1:54 
AnswerRe: don't catch in release? Pin
Tim Smith23-May-03 1:53
Tim Smith23-May-03 1:53 
GeneralRe: don't catch in release? Pin
saierdia23-May-03 2:33
saierdia23-May-03 2:33 
GeneralPrinting Pin
Petr_P22-May-03 20:29
Petr_P22-May-03 20:29 
GeneralRe: Printing Pin
Anonymous6-Feb-04 0:07
Anonymous6-Feb-04 0:07 
GeneralCStringArray in C++ Pin
Mazdak22-May-03 19:25
Mazdak22-May-03 19:25 
GeneralRe: CStringArray in C++ Pin
Joaquín M López Muñoz22-May-03 19:39
Joaquín M López Muñoz22-May-03 19:39 
GeneralRe: CStringArray in C++ Pin
Mazdak22-May-03 21:24
Mazdak22-May-03 21:24 
QuestionHow to Install a Windows XP theme in MFC program Pin
jia_wei22-May-03 18:37
jia_wei22-May-03 18:37 
QuestionHow do I set the “Comment” attribute of a file or folder using VB script ? Pin
Serge Krynine22-May-03 18:01
Serge Krynine22-May-03 18:01 
QuestionWhat does macro guard do in header file. Pin
Link260022-May-03 17:33
Link260022-May-03 17:33 
AnswerRe: What does macro guard do in header file. Pin
Andrew Walker22-May-03 18:05
Andrew Walker22-May-03 18:05 
GeneralRe: What does macro guard do in header file. Pin
Serge Krynine22-May-03 18:28
Serge Krynine22-May-03 18:28 
AnswerRe: What does macro guard do in header file. Pin
Michael Dunn22-May-03 18:42
sitebuilderMichael Dunn22-May-03 18: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.