# KIM Error Reference Documentation

## Functions

- kim_error kim_string_get_last_error_message (kim_string *out_string, kim_error in_error)
    Get a text description of an error suitable for display to the user.

## Function Documentation

kim_error kim_string_get_last_error_message | ( | kim_string * | out_string,
|  | kim_error | in_error |
| ) |  |  |

Get a text description of an error suitable for display to the user.

Parameters:

  | out_string | On success, a human-readable UTF-8 string describing the error representedby in_error. Must be freed with kim_string_free().
  | in_error | an error code. Used to verify that the correct error string will be returned (see note below).

Returns:
  On success, KIM_NO_ERROR.

Note:
  This API is implemented using thread local storage. It should be called immediately after a KIM API returns an error code so that the correct string is returned. The returned copy may then be held by the caller until needed. If in_error does not match the last saved error KIM may return a less descriptive string.