Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Redirecting Run-Time Error Messages

Intel_C_Intel
Employee
569 Views
Good afternoon!

I am working on a CVF project porting some legacy VMS code to the Windows platform. I have a need to reroute the run-time error message destination. My application is built as a Windows application (/subsystem=Windows), but I need run-time errors to be either rerouted to the command prompt from which the program is run or to a file.

The on-line Help report that run-time error processing and traceback information for applications built as Windows apps are directed to a message box, but applications built as Console apps report run-time errors to the command prompt.

Is there a way to reroute run-time errors in CVF? Any help would be greatly appreciated...thanks!

David Miller
hdmiller@eastman.com
0 Kudos
4 Replies
Steven_L_Intel1
Employee
569 Views
I think that defining the environment variable FOR_NOERROR_DIALOGS to "TRUE" may do what you want. You can use SETENVQQ for this.

Steve
0 Kudos
Intel_C_Intel
Employee
569 Views
Steve -- thanks for the tip! FOR_NOERROR_DIALOGS by itself was not quite enough, but combining these three did the trick:

res=setenvqq('FOR_DIAGNOSTIC_LOG_FILE=LOGFILE.TXT')
res=SETENVQQ('FOR_NOERROR_DIALOGS=TRUE')
res=setenvqq('FOR_DISABLE_DIAGNOSTIC_DISPLAY=TRUE')

Again, much appreciated!
David Miller
0 Kudos
gkchang
Beginner
569 Views
I have a similar question. Currently, I uses a c-wrapper for my CVF DLL (similar to the CVF 6.5a example, EXCEPTIONHANDLINGVBVF1) and I would like to re-route/log any runtime error to the caller routine (mainly, VB). Is there any alternative to TRACEBACKQQ so that I can retrieve traceback information silently without showing a dialog?
TIA
George Chang
0 Kudos
Steven_L_Intel1
Employee
569 Views
I don't quite understand what you want, George. Do you want this to happen if an error occurs? If so, the caller may not regain control. Please outline how you would use such a thing.

Steve
0 Kudos
Reply