New and Improved Error Detail Display in Sueetie v3.1

Providing more detailed error messages for Sueetie Site Administrators was not something I planned for v3.1, but it was suggested by a Sueetie Insider and was a darn good idea.  The goal was to display the generic error page (below) to all users, but show the full exception to Sueetie Administrators.  This would make diagnosing and following-up on user error reports more efficient.

Here’s the generic error page that users see.  Not a lot of information as you can see.

I always loved how BlogEngine.NET handled exception details, so I went there first to learn how the masters did it.  Perhaps you saw the BlogEngine.NET error page, the one that starts with “This one’s down to me.”  Very tight.  The exception is also logged in the Event Logs.

Rather than re-invent the wheel, I based Sueetie exception detail display logic on BlogEngine.NET’s, which as we’ve established, is great.  We’re adding a Server.GetLastError() in the Global.asax Application_Error() event and saving all exception items to a httpContext Dictionary Key/Value Item. Then we’re doing a rewrite—not redirect—to the generic error page containing a panel with error details for those in the SueetieAdministrator role and the minimalistic sorry-bout-that panel for everyone else.  Here’s an example of what Sueetie Administrators see.

The exception is also written to the Sueetie EventLog.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.