diff options
Diffstat (limited to 'src/DotNetOAuth/Messaging/ProtocolException.cs')
-rw-r--r-- | src/DotNetOAuth/Messaging/ProtocolException.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/DotNetOAuth/Messaging/ProtocolException.cs b/src/DotNetOAuth/Messaging/ProtocolException.cs index 10cb884..6101073 100644 --- a/src/DotNetOAuth/Messaging/ProtocolException.cs +++ b/src/DotNetOAuth/Messaging/ProtocolException.cs @@ -90,7 +90,12 @@ namespace DotNetOAuth.Messaging { /// This property should only be called when the error is being sent as an indirect response.
/// </remarks>
Uri IDirectedProtocolMessage.Recipient {
- get { return this.recipient; }
+ get {
+ if (this.inResponseTo == null) {
+ throw new InvalidOperationException(MessagingStrings.ExceptionNotConstructedForTransit);
+ }
+ return this.recipient;
+ }
}
#endregion
|