Exemple #1
0
        private void ShowResponseError(
            ReaPi.ResponseHandle response,
            ReaPi.ConnectionIdentifier connectionId,
            string command,
            ReaPi.EErrorCode error)
        {
            if (error == ReaPi.EErrorCode.OK)
            {
                if (showResponseWithStatusOK == true)
                {
                    SendToDashboard(MessageType.EVENT, $"{command}", null, null);
                }
            }
            else
            {
                int    err          = 0;
                string lastError    = command + ", Błąd: " + error;
                string errorMessage = ReaPi.GetErrorMessage(response, out err);
                string errorDomain  = ReaPi.GetErrorDomain(response, out err).ToString();
                string errorCode    = ReaPi.GetErrorCode(response, out err).ToString();

                SendToDashboard(MessageType.ERROR, lastError, errorCode + " / " + errorDomain, errorMessage);
            }
        }