コード例 #1
0
 public void HandleFailureMessage(string code, string message)
 {
     DequeueMessage();
     Error = ParseServerException(code, message);
     CurrentResponseCollector?.DoneFailure();
     _logger?.Debug("S: ", new FailureMessage(code, message));
 }
コード例 #2
0
        public void HandleFailureMessage(string code, string message)
        {
            DequeueMessage();
            var parts          = code.Split('.');
            var classification = parts[1].ToLowerInvariant();

            switch (classification)
            {
            case "clienterror":
                Error = new ClientException(code, message);
                break;

            case "transienterror":
                Error = new TransientException(code, message);
                break;

            default:
                Error = new DatabaseException(code, message);
                break;
            }
            CurrentResponseCollector?.DoneFailure();
            _logger?.Debug("S: ", new FailureMessage(code, message));
        }