manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.8 Error handling

Normally user should set it to zero by SetWarn(0); before plotting and check if GetWarnCode() or Message() return non 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: void SetWarn (int code, const char *info="")
C function: void mgl_set_warn (HMGL gr, int code, const char *info)

Set warning code. Normally you should call this function only for clearing the warning state, i.e. call SetWarn(0);. Text info will be printed as is if code<0.

Method on mglGraph: const char * Message ()
C function: const char * mgl_get_mess (HMGL gr)

Return messages about matters why some plot are not drawn. If returned string is empty then there are no messages.

Method on mglGraph: int GetWarnCode ()
C function: int mgl_get_warn_code (HMGL gr)

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] [ ? ]

This document was generated on April 13, 2012 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.