2010 December, 21 (Guerric) (1)

    Table of contents
    No headers
    // Paste PHP Code
    Index: Controllers/AccountController.cs
    ===================================================================
    --- Controllers/AccountController.cs	(revision 24333)
    +++ Controllers/AccountController.cs	(working copy)
    @@ -31,6 +31,7 @@
     using System.Web.Mvc;
     using System.Web.Routing;
     using log4net;
    +using MindTouch.Dream;
     using MindTouch.Portal.Common;
     using MindTouch.Portal.Common.Config;
     using MindTouch.Portal.Data;
    @@ -431,10 +432,11 @@
                         model.RecommendedSeats = Mapper.Map<List<SiteUserInfo>, List<SiteUserInfoJsonModel>>(recommended);
                         model.SeatsAssigned = seatsAssigned;
                         model.SeatsLicensed = seatsLicensed;
    -                } catch(Exception e) {
    -
    -                    // failed to load the instance information. is the site down?
    +                }catch(DreamResponseException e) {
                         _log.Error("Failed to set seats for the instance", e);
    +                    return View("SeatManagementUnavailable", e);
    +                }catch(Exception e) {
    +                    _log.Error("Failed to set seats for the instance", e);
     
                         // TODO (CL-231): Need to handle unavailable instances for SeatManagement (http://youtrack.developer.mindtouch.com/issue/CL-231)
                         return View("SeatManagementUnavailable");
    Index: Views/Account/SeatManagementUnavailable.aspx
    ===================================================================
    --- Views/Account/SeatManagementUnavailable.aspx	(revision 24333)
    +++ Views/Account/SeatManagementUnavailable.aspx	(working copy)
    @@ -1,4 +1,4 @@
    -<%@ Page Title="Seat Management" Language="C#" MasterPageFile="~/Views/Shared/Account.Master" Inherits="System.Web.Mvc.ViewPage<MindTouch.Portal.Site.Models.AccountMasterModel>" %>
    +<%@ Page Title="Seat Management" Language="C#" MasterPageFile="~/Views/Shared/Account.Master" Inherits="System.Web.Mvc.ViewPage<MindTouch.Dream.DreamResponseException>" %>
     
     <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <div class="top-bar">
    @@ -8,6 +8,13 @@
     <div>
         <p>Your instance is currently unavailable.</p>
         <p>Please try refreshing the page.</p>
    +    
    +    <% if(Model != null) { %>
    +        <h3>Here is some additional information about the error:</h3>
    +        <pre class="errors">
    +            <%= Html.Encode(Model.Response.ToDocument())%>
    +        </pre>
    +    <% } %>
     </div>
     
     </asp:Content>
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by