Click here to Skip to main content
15,913,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interfaces to other applications Pin
Brian Olej20-Feb-03 14:26
Brian Olej20-Feb-03 14:26 
GeneralRe: Interfaces to other applications Pin
Anders Molin20-Feb-03 14:07
professionalAnders Molin20-Feb-03 14:07 
GeneralRe: Interfaces to other applications Pin
User 988521-Feb-03 3:06
User 988521-Feb-03 3:06 
General"Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:39
Anton A. Loukine20-Feb-03 11:39 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Dave Bryant20-Feb-03 11:51
Dave Bryant20-Feb-03 11:51 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:58
Anton A. Loukine20-Feb-03 11:58 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Gary R. Wheeler20-Feb-03 14:36
Gary R. Wheeler20-Feb-03 14:36 
GeneralRephrasing the question Pin
Anonymous21-Feb-03 3:18
Anonymous21-Feb-03 3:18 
That's what I am doing right now; however, users can be dumb enough to supply an array of 10 values but set the number of attached values to 20.

I guess I can rephrase the question a little bit:

Is there a way to trap UNEXPECTED error in C++? As far as I can see, you can stick in "throw" where you think the application may fail, but is there a way to assign error handling to the whole routine so that no matter where and why it fails there, go to a specific location. For example in VB, it is achieved this way:

On Error GoTo ErrorHandler

....
code
.........

Exit Function
Error Handler:
if err = 12 Then .....



GeneralRe: Rephrasing the question Pin
jhwurmbach21-Feb-03 3:34
jhwurmbach21-Feb-03 3:34 
GeneralRe: Rephrasing the question Pin
Gary R. Wheeler21-Feb-03 11:22
Gary R. Wheeler21-Feb-03 11:22 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Chris Losinger20-Feb-03 12:06
professionalChris Losinger20-Feb-03 12:06 
GeneralRe: "Try" to "Catch" without "Throw" Pin
markkuk20-Feb-03 12:32
markkuk20-Feb-03 12:32 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 12:44
Anton A. Loukine20-Feb-03 12:44 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach20-Feb-03 21:00
jhwurmbach20-Feb-03 21:00 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anonymous21-Feb-03 3:19
Anonymous21-Feb-03 3:19 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach21-Feb-03 3:49
jhwurmbach21-Feb-03 3:49 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Christian Graus20-Feb-03 16:08
protectorChristian Graus20-Feb-03 16:08 
GeneralCopy opened files (read protected files) Pin
JGranborg20-Feb-03 11:37
JGranborg20-Feb-03 11:37 
GeneralCannot run MFC-compiled application on Win98se Pin
Valera24117620-Feb-03 11:21
Valera24117620-Feb-03 11:21 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
PJ Arends20-Feb-03 11:45
professionalPJ Arends20-Feb-03 11:45 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
Anonymous20-Feb-03 13:37
Anonymous20-Feb-03 13:37 
GeneralCString Array and Inserting Elements Pin
John W Hagen20-Feb-03 11:17
John W Hagen20-Feb-03 11:17 
GeneralRe: CString Array and Inserting Elements Pin
User 665820-Feb-03 11:29
User 665820-Feb-03 11:29 
GeneralRe: CString Array and Inserting Elements Pin
John W Hagen20-Feb-03 14:00
John W Hagen20-Feb-03 14:00 
GeneralCapturing 'Enter' key Pin
Toni7820-Feb-03 10:49
Toni7820-Feb-03 10:49 

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.