2.4. tsGetError

Syntax

Pascal

function tsGetError: tsEnum;

C/C++

tsEnum tsGetError();

Description

Returns the current error code and reset it to TS_NO_ERROR. If you need the error codes several times you must cache the error code in an local variable.

[Important] Important

The errorcode dosn't represent the last functioncall. The errorcode means the last ocured error. But often the real error cause some later errors.

Return Values

TS_NO_ERROR

Allready is fine

TS_NOT_INITIALIZED

Some functions need an subsystem (like OpenGL) but if it's not initialized you get this error code. For more informations how to initialize some subsystem see tsInit.

TS_NO_ACTIVE_CONTEXT

There is no context bound to the current thread so the library couldn't do anything. To bind an context you must call tsContextBind.

TS_NO_ACTIVE_RENDERER

For the current context no renderer was set. To set up an renderer you must set the parameter TS_RENDERER.

TS_NO_ACTIVE_FONT

The operation you called needs an bound font but there was no font bound. To bind an font call tsFontBind.

TS_OUT_OF_MEMORY

If you try to create an object or an image and there is not enough memory this error ocours. For more informations about this error see in the Error Codes of the representing function.

TS_INVALID_OPERATION

The operation you called is not allowed at this position and will be ignored. For more informations about this error see in the Error Codes of the representing function.

TS_INVALID_ENUM

There are several functions witch needs an enumeration as parameter. If this value isn't right this error will be set. For more informations about this error see in the Error Codes of the representing function.

TS_INVALID_VALUE

This error will be set if you have an enumeration param and the value for this enum isn't right. Also it will be set if you pass an wrong ID of an object to an function. For more informations about this error see in the Error Codes of the representing function.

TS_ERROR

Yes there is an error but this error. Normally it's an general error nut in some cases it's an internal error. In most situations you will get an typed error code.