Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && _err != null)
     {
         _err = null;
     }
     base.Dispose(disposing);
 }
Пример #2
0
        // POST api/updateerror
        public void Post(ErrUpdatePoco err)
        {
            try
            {
                try
                {
                    if (err.Id == 0)
                    {
                        var cliError    = JsonConvert.DeserializeObject <dynamic>(err.Error);
                        var errorString = new StringBuilder();
                        foreach (JProperty item in cliError)
                        {
                            errorString.AppendFormat("{0}: {1}<br>", item.Name, item.Value.ToString().Replace("\n", "<br>\n"));
                        }

                        var innerEx = new Exception(errorString.ToString())
                        {
                            Source = "Javascript (client)"
                        };
                        Logging.WriteDebugInfoToErrorLog("A client-side error occured", innerEx, Wutcontext, WebContextBase, err.Comment);
                    }
                    else
                    {
                        using (var errbl = new ErrorItemBL(WebContextBase, Wutcontext))
                        {
                            errbl.UpdateErrorItemUserComment(err.Id, err.Comment);
                        }
                    }
                }
                catch (Exception ex)
                {
                    //Writing to node WEL
                    Logging.WriteToAppLog("Unable to save user comments. \r\nError: " + ex.Message + ". \r\nComment: " + err.Comment, System.Diagnostics.EventLogEntryType.Error);
                }
            }
            catch (Exception)
            {
                //not a biggie, we have to pick our battles here...
                HttpContext.Current.ClearError();
            }
        }
Пример #3
0
 public ErrorLogController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
     _err = new ErrorItemBL(WebContextBase, Wutcontext);
 }
Пример #4
0
 public ErrorLogController()
 {
     _err = new ErrorItemBL();
 }