Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
print nicer errors in consumer example when exception is FailureExcep…
Browse files Browse the repository at this point in the history
…tion

darcs-hash:20060620182629-f4df0-f55fcc3b436033cea8df9e4f66eea67f8d15a1cf.gz
  • Loading branch information
Grant Monroe committed Jun 20, 2006
1 parent 01e8595 commit d25d3f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/consumer/ConsumerHttpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ private void AuthenticateRequest(Object sender, EventArgs e)
trustRoot, returnTo, AuthRequest.Mode.SETUP);
Response.Redirect(redirectUrl.AbsoluteUri);
}
catch (FailureException fexc)
{
Context.Items.Add("errmsg", fexc.Message);
}
catch (Exception fe)
{
Context.Items.Add("errmsg", fe.ToString());
Expand All @@ -79,6 +83,10 @@ private void AuthenticateRequest(Object sender, EventArgs e)
FormsAuthentication.RedirectFromLoginPage(
resp.IdentityUrl.AbsoluteUri, false);
}
catch (FailureException fexc)
{
Context.Items.Add("errmsg", fexc.Message);
}
catch (Exception fe)
{
Context.Items.Add("errmsg", fe.ToString());
Expand Down

0 comments on commit d25d3f6

Please sign in to comment.