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
+7 -1
View File
@@ -39,6 +39,12 @@
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Exceptionless">
<HintPath>..\packages\Exceptionless.1.5.2092\lib\net45\Exceptionless.dll</HintPath>
</Reference>
<Reference Include="Exceptionless.Models">
<HintPath>..\packages\Exceptionless.1.5.2092\lib\net45\Exceptionless.Models.dll</HintPath>
</Reference>
<Reference Include="LumenWorks.Framework.IO">
<HintPath>..\packages\LumenWorks.Framework.IO.3.8.0\lib\net20\LumenWorks.Framework.IO.dll</HintPath>
</Reference>
@@ -380,7 +386,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2014/6/1" 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_StartDate="2014/6/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
+5 -3
View File
@@ -1,8 +1,8 @@
using System;
using Disco.Services.Logging.Models;
using Exceptionless;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Services.Logging.Models;
namespace Disco.Services.Logging
{
@@ -44,6 +44,8 @@ namespace Disco.Services.Logging
}
public static void LogException(string Component, Exception ex)
{
ex.ToExceptionless().Submit();
// Handle Special-Case Errors
if (ex is System.Data.Entity.Validation.DbEntityValidationException)
{
+5
View File
@@ -5,6 +5,7 @@ using System.Text;
using Disco.Services.Logging;
using Disco.Services.Logging.Models;
using System.Reflection;
using Exceptionless;
namespace Disco.Services.Plugins
{
@@ -123,6 +124,8 @@ namespace Disco.Services.Plugins
public static void LogInitializeException(string PluginFilename, Exception ex)
{
ex.ToExceptionless().AddObject(PluginFilename, "PluginFilename").Submit();
if (ex.InnerException != null)
{
Log(EventTypeIds.InitializeExceptionWithInner, PluginFilename, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace);
@@ -135,6 +138,8 @@ namespace Disco.Services.Plugins
public static void LogPluginException(string Component, Exception ex)
{
ex.ToExceptionless().AddObject(Component, "Component").Submit();
if (ex.InnerException != null)
{
Log(EventTypeIds.PluginExceptionWithInner, Component, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace);
+2 -5
View File
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Disco.Data.Repository;
using Quartz;
using Disco.Data.Repository;
using System;
namespace Disco.Services.Tasks
{
+11
View File
@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using Disco.Services.Logging;
using Disco.Services.Logging.Models;
using Exceptionless;
namespace Disco.Services.Tasks
{
@@ -54,6 +55,8 @@ namespace Disco.Services.Tasks
public static void LogInitializeException(Exception ex)
{
ex.ToExceptionless().Submit();
if (ex.InnerException != null)
{
Log(EventTypeIds.InitializeExceptionWithInner, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace);
@@ -65,6 +68,8 @@ namespace Disco.Services.Tasks
}
public static void LogInitializeException(Exception ex, Type ScheduledTaskType)
{
ex.ToExceptionless().Submit();
if (ex.InnerException != null)
{
Log(EventTypeIds.InitializeScheduledTasksExceptionWithInner, ScheduledTaskType.Name, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace);
@@ -77,6 +82,12 @@ namespace Disco.Services.Tasks
public static void LogScheduledTaskException(string ScheduledTaskName, string SessionId, Type ScheduledTaskType, Exception ex)
{
ex.ToExceptionless()
.AddTags("Scheduled Task")
.AddObject(ScheduledTaskName, "ScheduledTaskName")
.AddObject(ScheduledTaskType.Name, "ScheduledTaskTypeName")
.Submit();
if (ex.InnerException != null)
{
Log(EventTypeIds.ScheduledTasksExceptionWithInner, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace);
+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="LumenWorks.Framework.IO" version="3.8.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />