calling R_curErrorBuf to get the current error message