Mamba C API reference

Version 2.0

MB_Error.h File Reference

Go to the source code of this file.

Enumerations

enum  MB_errcode {
  MB_NO_ERR, MB_ERR_BAD_SIZE, MB_ERR_BAD_DEPTH, MB_ERR_BAD_PARAMETER,
  MB_ERR_BAD_VALUE, MB_ERR_BAD_DIRECTION, MB_ERR_CANT_ALLOCATE_MEMORY, MB_ERR_BAD_IMAGE_DIMENSIONS,
  MB_ERR_LOAD_DATA, MB_ERR_UNKNOWN
}
 

Functions

MB_API_ENTRY char *MB_API_CALL MB_StrErr (MB_errcode error_nb)
 

Enumeration Type Documentation

enum MB_errcode

Type definition for error code.

Enumerator
MB_NO_ERR 

Value returned by function when no error was encountered.

MB_ERR_BAD_SIZE 

Value returned by function when an error of size inside the image was encountered. For example, if the width of a first image was not corresponding with the width of a second image when both are used in the same computations.

MB_ERR_BAD_DEPTH 

Value returned by function when an error of depth inside the image was encountered. For example, the function expected 8-bit pixels and got 1-bit pixels.

MB_ERR_BAD_PARAMETER 

Value returned by function when a given parameter was incorrect.

MB_ERR_BAD_VALUE 

Value returned by function when a given value (as argument) was incorrect.

MB_ERR_BAD_DIRECTION 

Value returned when a function requiring a direction (shift, neighbor) is given an incorrect argument for direction (allowed value depends on the grid).

MB_ERR_CANT_ALLOCATE_MEMORY 

Value returned when the allocation for image memory failed.

MB_ERR_BAD_IMAGE_DIMENSIONS 

Value returned when the dimension of the image given in argument of a function is incorrect.

MB_ERR_LOAD_DATA 

Value returned when the data given to a load function is incorrect (size or type).

MB_ERR_UNKNOWN 

Value never returned (reserved for the error function).

Function Documentation

MB_API_ENTRY char* MB_API_CALL MB_StrErr ( MB_errcode  error_nb)

Returns an explanation of the error code.

Parameters
error_nbthe error code number