Feature #40: Exceptionless error reporting

This commit is contained in:
Gary Sharp
2014-07-28 20:55:53 +10:00
parent 7062a40dfb
commit ea80876286
20 changed files with 119 additions and 35 deletions
+11 -5
View File
@@ -1,9 +1,10 @@
using System;
using Disco.BI.Extensions;
using Exceptionless;
using iTextSharp.text.pdf;
using System;
using System.Drawing;
using System.IO;
using System.Linq;
using Disco.BI.Extensions;
using iTextSharp.text.pdf;
namespace Disco.BI.AttachmentBI
{
@@ -33,10 +34,11 @@ namespace Disco.BI.AttachmentBI
}
}
}
catch (Exception)
catch (Exception ex)
{
ex.ToExceptionless().Submit();
// Ignore Thumbnail Generation exceptions for images
//throw;
}
}
@@ -63,6 +65,10 @@ namespace Disco.BI.AttachmentBI
}
}
}
catch (Exception ex)
{
ex.ToExceptionless().Submit();
}
finally
{
if (pdfReader != null)
+4 -1
View File
@@ -7,10 +7,10 @@ using Disco.Services.Interop.ActiveDirectory;
using Disco.Services.Users;
using System;
using System.Collections.Generic;
using System.DirectoryServices.ActiveDirectory;
using System.Linq;
using System.Text.RegularExpressions;
using Tamir.SharpSsh;
using Exceptionless;
namespace Disco.BI.DeviceBI
{
@@ -118,6 +118,7 @@ namespace Disco.BI.DeviceBI
}
catch (System.Exception ex)
{
ex.ToExceptionless().Submit();
EnrolmentLog.LogSessionError(sessionId, ex);
throw ex;
}
@@ -306,6 +307,7 @@ namespace Disco.BI.DeviceBI
}
catch (System.Exception ex2)
{
ex2.ToExceptionless().Submit();
EnrolmentLog.LogSessionError(sessionId, ex2);
throw ex2;
}
@@ -655,6 +657,7 @@ namespace Disco.BI.DeviceBI
}
catch (System.Exception ex2)
{
ex2.ToExceptionless().Submit();
EnrolmentLog.LogSessionError(sessionId, ex2);
throw ex2;
}
@@ -1,9 +1,10 @@
using Disco.Data.Repository;
using Exceptionless;
using Quartz;
using Quartz.Impl.Triggers;
using System;
using System.IO;
using System.Web.Caching;
using Disco.Data.Repository;
using Quartz;
using Quartz.Impl.Triggers;
namespace Disco.BI.DocumentTemplateBI.Importer
{
@@ -69,8 +70,9 @@ namespace Disco.BI.DocumentTemplateBI.Importer
}
File.Move(filename, filenameError);
}
catch
catch (Exception ex)
{
ex.ToExceptionless().Submit();
// Ignore Errors
}
}
@@ -108,6 +110,7 @@ namespace Disco.BI.DocumentTemplateBI.Importer
}
catch (Exception ex)
{
ex.ToExceptionless().Submit();
DocumentsLog.LogImportWarning(sessionId, string.Format("{0}; Will try again in 10 Seconds", ex.Message));
// Reschedule Job for 10 seconds
SimpleTriggerImpl trig = new SimpleTriggerImpl(Guid.NewGuid().ToString(), new DateTimeOffset(DateTime.Now.AddSeconds(10)));
@@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Models.Repository;
using Disco.BI.DocumentTemplateBI;
using Disco.Data.Repository;
using System.IO;
using Disco.BI.DocumentTemplateBI;
using Disco.Services.Users;
using Disco.Models.Repository;
using Disco.Services.Logging;
using Disco.Services.Users;
using Exceptionless;
using System;
using System.IO;
namespace Disco.BI.Extensions
{
@@ -9,6 +9,7 @@ using System.IO;
using Disco.Services.Users;
using Disco.Services.Authorization;
using Disco.Services.Interop.ActiveDirectory;
using Exceptionless;
namespace Disco.BI.Extensions
{
@@ -36,6 +37,7 @@ namespace Disco.BI.Extensions
}
catch (Exception ex)
{
ex.ToExceptionless().AddObject(deviceProfile.ComputerNameTemplate, "ComputerNameTemplate").Submit();
throw new InvalidOperationException(string.Format("An error occurred rendering the computer name: [{0}] {1}", ex.GetType().Name, ex.Message), ex.InnerException);
}
if (rendered == null || rendered.Length > 24)
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Exceptionless;
using Disco.Data.Repository;
using Disco.Models.BI.Config;
using Disco.Models.Repository;
@@ -219,7 +220,7 @@ namespace Disco.BI.Extensions
{
DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaWarranty.ExternalReference);
}
catch (Exception) { } // Ignore Errors as this is not completely necessary
catch (Exception ex) { ex.ToExceptionless().Submit(); } // Ignore Errors as this is not completely necessary
}
}
}
@@ -441,7 +442,7 @@ namespace Disco.BI.Extensions
{
DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaNonWarranty.RepairerReference);
}
catch (Exception) { } // Ignore Errors as this is not completely necessary
catch (Exception ex) { ex.ToExceptionless().Submit(); } // Ignore Errors as this is not completely necessary
}
}
}