Skip to content

Commit f05bd00

Browse files
authored
Merge pull request #1186 from rabbitmq/rabbitmq-dotnet-client-1185-2
Update AsyncDefaultBasicConsumer.cs
2 parents d4b49cf + e8af677 commit f05bd00

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

projects/RabbitMQ.Client/client/api/AsyncDefaultBasicConsumer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,33 +151,33 @@ public virtual async Task OnCancel(params string[] consumerTags)
151151

152152
event EventHandler<ConsumerEventArgs> IBasicConsumer.ConsumerCancelled
153153
{
154-
add { throw new InvalidOperationException("Should never be called."); }
155-
remove { throw new InvalidOperationException("Should never be called."); }
154+
add { throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'."); }
155+
remove { throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'."); }
156156
}
157157

158158
void IBasicConsumer.HandleBasicCancelOk(string consumerTag)
159159
{
160-
throw new InvalidOperationException("Should never be called.");
160+
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
161161
}
162162

163163
void IBasicConsumer.HandleBasicConsumeOk(string consumerTag)
164164
{
165-
throw new InvalidOperationException("Should never be called.");
165+
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
166166
}
167167

168168
void IBasicConsumer.HandleBasicDeliver(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, in ReadOnlyBasicProperties properties, ReadOnlyMemory<byte> body)
169169
{
170-
throw new InvalidOperationException("Should never be called.");
170+
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
171171
}
172172

173173
void IBasicConsumer.HandleModelShutdown(object model, ShutdownEventArgs reason)
174174
{
175-
throw new InvalidOperationException("Should never be called.");
175+
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
176176
}
177177

178178
void IBasicConsumer.HandleBasicCancel(string consumerTag)
179179
{
180-
throw new InvalidOperationException("Should never be called.");
180+
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
181181
}
182182
}
183183
}

0 commit comments

Comments
 (0)