private void ReportException(string _source, Exception _ex) { string _tmplt = "ReportExceptionTemplate".GetShepherdLocalizedString(); Anons _entry = Anons.CreateAnons(_source, String.Format(_tmplt, _ex.Message)); EDC.EventLogList.InsertOnSubmit(_entry); EDC.SubmitChanges(); }
protected virtual void ShowActionResult(ActionResult _rslt) { if (_rslt.LastActionResult != ActionResult.Result.Exception) { return; } Anons _entry = Anons.CreateAnons(_rslt.ActionException.Source, _rslt.ActionException.Message); using (EntitiesDataContext _EDC = new EntitiesDataContext(SPContext.Current.Web.Url)) { _EDC.EventLogList.InsertOnSubmit(_entry); _EDC.SubmitChanges(); } }