diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-10 10:07:56 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-10 10:07:56 -0700 |
commit | 08c9922ce58fc07ce3764b6229b10225c7f9bd89 (patch) | |
tree | 78db6dd4b4db59be64985484661ea08be9e702c9 /src/DotNetOAuth/Messaging/ProtocolException.cs | |
parent | 51070c061fc7eaa15d9281878da9400dd0260b59 (diff) | |
download | DotNetOpenAuth-08c9922ce58fc07ce3764b6229b10225c7f9bd89.zip DotNetOpenAuth-08c9922ce58fc07ce3764b6229b10225c7f9bd89.tar.gz DotNetOpenAuth-08c9922ce58fc07ce3764b6229b10225c7f9bd89.tar.bz2 |
Code coverage work in ProtocolException.
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
|