parameters: (ret)
docstring: Check the return value of C API call
  
      This function will raise exception when error occurs.
      Wrap every API call with this function
  
      Parameters
      ----------
      ret : int
          return value from API calls
docstring_summary: Check the return value of C API call
docstring_tokens: Check the return value of C API call
function: def _check_call(ret):
      """Check the return value of C API call
  
      This function will raise exception when error occurs.
      Wrap every API call with this function
  
      Parameters
      ----------
      ret : int
          return value from API calls
      """
      if ret != 0:
          msg = ""
          # raise XLearnError()
          _LIB.XLearnGetLastError.restype = ctypes.POINTER(ctypes.c_ubyte)
          ptr = _LIB.XLearnGetLastError()
          idx = 0
          while(ptr[idx] != 0):
              msg += chr(ptr[idx])
              idx += 1
          raise XLearnError(msg)
function_tokens: def _check_call ( ret ) : if ret != 0 : msg = "" # raise XLearnError() _LIB . XLearnGetLastError . restype = ctypes . POINTER ( ctypes . c_ubyte ) ptr = _LIB . XLearnGetLastError ( ) idx = 0 while ( ptr [ idx ] != 0 ) : msg += chr ( ptr [ idx ] ) idx += 1 raise XLearnError ( msg )