private void ThrowMaxReceivedMessageSizeExceeded() { if (TD.MaxReceivedMessageSizeExceededIsEnabled()) { TD.MaxReceivedMessageSizeExceeded(SR.Format(SR.MaxReceivedMessageSizeExceeded, _factory.MaxReceivedMessageSize)); } string message = SR.Format(SR.MaxReceivedMessageSizeExceeded, _factory.MaxReceivedMessageSize); Exception inner = new QuotaExceededException(message); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new CommunicationException(message, inner)); }
internal static Exception CreateMaxReceivedMessageSizeExceededException(long maxMessageSize) { string message = SR.GetString(SR.MaxReceivedMessageSizeExceeded, maxMessageSize); Exception inner = new QuotaExceededException(message); if (TD.MaxReceivedMessageSizeExceededIsEnabled()) { TD.MaxReceivedMessageSizeExceeded(message); } return(new CommunicationException(message, inner)); }