clscrs_get_error_details

The clscrs_get_error_details API retrieves and returns the clsk exception stack if there are any failures while invoking other CLSCRS APIs.

Note:

The caller is responsible for allocating memory for error_buf.

Parameters

Input:

  • error_buf: The buffer that will be populated with the error stack.
  • buf_size: The size of the buffer for error_buf. If the size of the buffer given is smaller than what is required, then the API returns a value for the necessary buffer size.

Returns

  • clscrsretSUCC: Indicates that the error stack printed successfully.
  • clscrsretEMPTY: Displays if the error stack is empty.
  • clscrsretBADARG: Displays if either error_buf or buf_size is NULL.
  • clscrsretBUFFSMALL: Displays if the buffer size that you specify is smaller than what is required.

clscrsret

clscrs_get_error_details(oratext* error_buf, size_t* buf_size);