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
}
}
}
+9 -1
View File
@@ -43,6 +43,14 @@
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Exceptionless, Version=1.5.2092.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Exceptionless.1.5.2092\lib\net45\Exceptionless.dll</HintPath>
</Reference>
<Reference Include="Exceptionless.Models, Version=1.5.2092.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Exceptionless.1.5.2092\lib\net45\Exceptionless.Models.dll</HintPath>
</Reference>
<Reference Include="itextsharp">
<HintPath>..\Resources\Libraries\iTextSharp\itextsharp.dll</HintPath>
</Reference>
@@ -214,7 +222,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_StartDate="2014/6/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2014/6/1" />
</VisualStudio>
</ProjectExtensions>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="Exceptionless" version="1.5.2092" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net45" />