Skip to content

Commit ae20fb3

Browse files
author
John Simons
committed
Improving the exception text
1 parent 6eac0b4 commit ae20fb3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ServiceControl/Infrastructure/TransportMessageExtensions.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ public static string ProcessingEndpointName(this TransportMessage message)
2020
return message.ReplyToAddress.Queue;
2121
}
2222

23-
throw new InvalidOperationException("No processing endpoint could be determined for message");
23+
string messageTypes;
24+
if (!message.Headers.TryGetValue(Headers.EnclosedMessageTypes, out messageTypes))
25+
{
26+
messageTypes = "Unknown";
27+
}
28+
29+
throw new InvalidOperationException(string.Format("No processing endpoint could be determined for message ({0})", messageTypes));
2430
}
2531

2632
public static string UniqueId(this TransportMessage message)

0 commit comments

Comments
 (0)