Skip to content

Group CErrorHandling

Modules > CErrorHandling

The functions in this section provide access to additional information related to error returns.

Public Functions

Type Name
spinErrorGetLast (spinError * pError)
spinErrorGetLastBuildDate (char * pBuf, size_t * pBufLen)
spinErrorGetLastBuildTime (char * pBuf, size_t * pBufLen)
spinErrorGetLastFileName (char * pBuf, size_t * pBufLen)
spinErrorGetLastFullMessage (char * pBuf, size_t * pBufLen)
spinErrorGetLastFunctionName (char * pBuf, size_t * pBufLen)
spinErrorGetLastLineNumber (int64_t * pLineNum)
spinErrorGetLastMessage (char * pBuf, size_t * pBufLen)

Public Functions Documentation

function spinErrorGetLast

spinErrorGetLast (
    spinError * pError
) 

Retrieves the error code of the last error

See also: spinError

Parameters:

  • pError The error enum pointer in which the error message is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastBuildDate

spinErrorGetLastBuildDate (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the build date of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the build date is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastBuildTime

spinErrorGetLastBuildTime (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the build time of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the build time is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastFileName

spinErrorGetLastFileName (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the filename of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the file name is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastFullMessage

spinErrorGetLastFullMessage (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the full error message of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the full error message is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastFunctionName

spinErrorGetLastFunctionName (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the function name of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the function name is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastLineNumber

spinErrorGetLastLineNumber (
    int64_t * pLineNum
) 

Retrieves the line number of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the line number is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinErrorGetLastMessage

spinErrorGetLastMessage (
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the error message of the last error

See also: spinError

Parameters:

  • pBuf The c-string character buffer in which the error message is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error