| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.1.9 Error handling
There are 2 variables which indicate the warnings/errors presence during plot creation. Normally user should set it to zero by SetWarn(0); before plotting and check if WarnCode is not zero after plotting. Only last warning will be saved. All warnings/errors produced by MathGL is not critical – the plot just will not be drawn.
- Method on
mglGraph(C++):voidSetWarn (intcode,const char *who="") Set warning code and corresponding message from function who. Normally you should call this function only for clearing the warning state, i.e. call
SetWarn(0);.
- General option (C++) of mglGraph:
char *Message Pointer to buffer for writing messages about matters why some plot are not drawn. Set to NULL to disable messages. The buffer length must be at least 1024. If Message[0]==0 then there are no messages
- Method on
mglGraph(C++, Python):intGetWarnCode () - C function:
intmgl_get_warn_code (HMGLgr) Return the numerical ID of warning about the not drawn plot. Possible values are:
-
mglWarnNone=0 Everything OK
-
mglWarnDim Data dimension(s) is incompatible
-
mglWarnLow Data dimension(s) is too small
-
mglWarnNeg Minimal data value is negative
-
mglWarnFile No file or wrong data dimensions
-
mglWarnMem Not enough memory
-
mglWarnZero Data values are zero
-
mglWarnLegA Too many legend entries
-
mglWarnLeg No legend entries
-
mglWarnSlc Slice value is out of range
-
mglWarnCnt Number of contours is zero or negative
-
mglWarnOpen Couldn’t open file
-
mglWarnLId Light: ID is out of range
-
mglWarnSize Setsize: size(s) is zero or negative
-
mglWarnFmt Format is not supported for that build
-
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
