Skip to content

Instantly share code, notes, and snippets.

@RyannosaurusRex
Created August 5, 2012 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyannosaurusRex/3267474 to your computer and use it in GitHub Desktop.
Save RyannosaurusRex/3267474 to your computer and use it in GitHub Desktop.
ASP.NET MVC adding error information to your error page for easier debugging during development.
@model System.Web.Mvc.HandleErrorInfo
@{
ViewBag.Title = "Error";
}
<h2>
Sorry, an error occurred while processing your request.
</h2>
<!-- Don't do this in production! You don't want peeps seeing stack traces now, do you? -->
<div style="color:white">
@Model.Exception.Message
@Model.Exception.StackTrace
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment