FunctionPrepare a file for printing error messages into it
Syntax C/C++#include <VecLib.h>
void V_setErrorEventFile( char *filename, unsigned ScreenAndFile );
Pascal/Delphiuses VecLib;
procedure V_setErrorEventFile( filename:PChar; ScreenAndFile:UInt );
DescriptionThis function determines where to print messages notifying errors that occur within OptiVec routines. filename is the desired name of the event file (often called "log-file"). ScreenAndFile decides if you wish to have error messages printed simultaneously into the file and onto the screen:
ScreenAndFile = 0: no screen output.
ScreenAndFile = 1: output into a message box (i.e., Windows default)
ScreenAndFile = 2: output into stderr (for Console programmes only)
The event file is closed by V_closeErrorEventFile. After that, OptiVec error messages are emitted according to the paramter ScreenAndFile with which the event file was generated.
By callingV_setErrorEventFile with a value of NULL or "NULL" (C/C++), nil or 'nil' (Pascal/Delphi) for filename no event file is generated:
V_setErrorEventFile( "NULL", 0 );: Any OptiVec messages are completely suppressed (which is probably not a wise choice in most instances).
V_setErrorEventFile( "NULL", 1 );: messages are printed into a message box.
V_setErrorEventFile( "NULL", 2 );: for Console programmes only: messages are emitted to stderr. In Visual C++, this option is possible only if the dynamic RTL is used; in the configurations DebugStatic and ReleaseStatic, it cannot be used and would be treated as "0".
Any previously generated event file remaines unchanged by this, of course.
If a user-defined _matherr function (C/C++) or any other custom error handler (both C/C++ and Pascal/Delphi) calls V_noteError, also errors occurring outside OptiVec routines will lead to a message printed into the event file (see chapter 5.5).
Error handlingIf the desired event file cannot be opened or created, the program is aborted with a message "Cannot open error event file".
Return valuenone
See alsoV_noteError,   V_closeErrorEventFile

VectorLib Table of Contents  OptiVec home