Skip to content

Commit

Permalink
Throw a CoapEndpointException instead of InvalidOperationException
Browse files Browse the repository at this point in the history
  • Loading branch information
NZSmartie committed Dec 4, 2017
1 parent f782278 commit 30d06ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CoAPNet/CoapClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public async Task<CoapReceiveResult> ReceiveAsync(CancellationToken token)
: await resultTask;

if (Endpoint == null)
throw new InvalidOperationException($"{nameof(CoapClient)} is in an invalid state");
throw new CoapEndpointException($"{nameof(CoapClient)} does not have a valid endpoint");

StartReceiveAsyncInternal();

Expand Down

0 comments on commit 30d06ee

Please sign in to comment.