# Error Diagnostics

The VML library has its own error handler. The only difference for C- and Fortran- interfaces is that the Intel MKL error reporting routine XERBLA can be called after the Fortran- interface VML function encounters an error, and this routine gets information on VML_STATUS_BADSIZE and VML_STATUS_BADMEM input errors (see Table “Values of the VML Error Status”).

The VML error handler has the following properties:

- The Error Status (vmlErrStatus) global variable is set after each VML function call. The possible values of this variable are shown in the Table “Values of the VML Error Status”.

- Depending on the VML mode, the error handler function invokes:

  - errno variable setting. The possible values are shown in the Table “Set Values of the errno Variable”.

  - writing error text information to the stderr stream

  - raising the appropriate exception on error, if necessary

  - calling the additional error handler callback function.

Set Values of the errno Variable
Value of errno | Description
--- | ---
0 | No errors are detected.
EINVAL | The array dimension is not positive.
EACCES | NULL pointer is passed.
EDOM | At least one of array values is out of a range of definition.
ERANGE | At least one of array values caused a singularity, overflow or underflow.

Parent topic: Vector Mathematical Functions