The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Error codes in try-catch statements

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Alex-qwerty Posted - 10/02/2010 : 09:56:40 AM
Origin 8.1 SR3; WinXP

I use try/catch wrapping for calling some NAG functions.
try 
{
    nag_opt_simplex ( ... );
}
catch(int nErr) 
{ 
    printf("nErr = %i \n",  nErr);
}

Where can I find the meaning of error values (nErr)?
3   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 10/09/2010 : 02:27:48 AM
Hi,

It is about the parameter, which is a pointer to Nag_E04_Opt structure. It is not safe to pass the default pointer to this parameter. Please refer to this example on how to call this function.

Penn
Alex-qwerty Posted - 10/08/2010 : 4:30:33 PM
I know about NagError.
But sometimes it is useless. It has correct error code if there was NO exception. Sometimes my project crashes without try/catch statement. Try/catch allows to keep project alive. Try/catch return error code (288), but I don't know the meaning of thise code.
Penn Posted - 10/08/2010 : 01:34:44 AM
Hi,

All NAG functions accept one argument, NagError structure. This structure is used to test whether the NAG function is executing successfully or not. So you can use this structure instead, but not the try/catch. Please refer to this example.

Penn

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000