qol: remove exceptionless
This commit is contained in:
@@ -3,7 +3,6 @@ using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Documents.ManagedGroups;
|
||||
using Disco.Services.Users;
|
||||
using Exceptionless;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
@@ -249,10 +248,7 @@ namespace Disco.Services
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
}
|
||||
|
||||
@@ -281,10 +277,7 @@ namespace Disco.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
Thumbnail = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Disco.Models.ClientServices.EnrolmentInformation;
|
||||
using Disco.Models.Repository;
|
||||
using Exceptionless.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -6,7 +6,6 @@ using Disco.Services.Documents;
|
||||
using Disco.Services.Expressions;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Users;
|
||||
using Exceptionless;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -36,7 +35,6 @@ namespace Disco.Services
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -4,7 +4,6 @@ using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Users;
|
||||
using Exceptionless;
|
||||
using PListNet;
|
||||
using PListNet.Nodes;
|
||||
using Renci.SshNet;
|
||||
@@ -148,7 +147,6 @@ namespace Disco.Services.Devices.Enrolment
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
EnrolmentLog.LogSessionError(sessionId, ex);
|
||||
throw ex;
|
||||
}
|
||||
@@ -283,9 +281,8 @@ namespace Disco.Services.Devices.Enrolment
|
||||
EnrolmentLog.LogSessionError(sessionId, ex);
|
||||
return new MacEnrolResponse { ErrorMessage = ex.Message };
|
||||
}
|
||||
catch (System.Exception ex2)
|
||||
catch (Exception ex2)
|
||||
{
|
||||
ex2.ToExceptionless().Submit();
|
||||
EnrolmentLog.LogSessionError(sessionId, ex2);
|
||||
throw ex2;
|
||||
}
|
||||
@@ -665,9 +662,8 @@ namespace Disco.Services.Devices.Enrolment
|
||||
ErrorMessage = ex.Message
|
||||
};
|
||||
}
|
||||
catch (System.Exception ex2)
|
||||
catch (Exception ex2)
|
||||
{
|
||||
ex2.ToExceptionless().Submit();
|
||||
EnrolmentLog.LogSessionError(sessionId, ex2);
|
||||
throw ex2;
|
||||
}
|
||||
|
||||
@@ -47,12 +47,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.Data.Repository;
|
||||
using Exceptionless;
|
||||
using Quartz;
|
||||
using Quartz.Impl.Triggers;
|
||||
using System;
|
||||
@@ -49,8 +48,6 @@ namespace Disco.Services.Documents.AttachmentImport
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
|
||||
// Retry 18 times (for 3 minutes)
|
||||
if (retryCount < 18)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.RepairProvider;
|
||||
using Disco.Services.Plugins.Features.WarrantyProvider;
|
||||
using Disco.Services.Users;
|
||||
using Exceptionless;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -221,7 +220,7 @@ namespace Disco.Services
|
||||
{
|
||||
DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaWarranty.ExternalReference);
|
||||
}
|
||||
catch (Exception ex) { ex.ToExceptionless().Submit(); } // Ignore Errors as this is not completely necessary
|
||||
catch (Exception) { } // Ignore Errors as this is not completely necessary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -443,7 +442,7 @@ namespace Disco.Services
|
||||
{
|
||||
DiscoServicesJobs.UpdateRecipientReference(Database, j, publishJobResult.Id, publishJobResult.Secret, j.JobMetaNonWarranty.RepairerReference);
|
||||
}
|
||||
catch (Exception ex) { ex.ToExceptionless().Submit(); } // Ignore Errors as this is not completely necessary
|
||||
catch (Exception) { } // Ignore Errors as this is not completely necessary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.Services.Logging.Models;
|
||||
using Exceptionless;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -44,8 +43,6 @@ 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)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Plugins.Details;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Users;
|
||||
using Exceptionless.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
using System.Reflection;
|
||||
using Exceptionless;
|
||||
|
||||
namespace Disco.Services.Plugins
|
||||
{
|
||||
@@ -122,8 +121,6 @@ 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);
|
||||
@@ -136,8 +133,6 @@ 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);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Entity.Validation;
|
||||
using System.Text;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
using Exceptionless;
|
||||
|
||||
namespace Disco.Services.Tasks
|
||||
{
|
||||
@@ -55,8 +57,6 @@ 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);
|
||||
@@ -68,8 +68,6 @@ 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);
|
||||
@@ -82,19 +80,37 @@ 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)
|
||||
string message;
|
||||
if (ex is DbEntityValidationException dbException)
|
||||
{
|
||||
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);
|
||||
StringBuilder messageBuilder = new StringBuilder();
|
||||
messageBuilder.AppendLine("Validation failed for one or more entities:");
|
||||
foreach (var dbEntityError in dbException.EntityValidationErrors)
|
||||
{
|
||||
messageBuilder.Append("'").Append(dbEntityError.Entry.Entity.GetType().Name).AppendLine("' Object");
|
||||
foreach (var dbValidationError in dbEntityError.ValidationErrors)
|
||||
{
|
||||
messageBuilder.Append(" ").Append(dbValidationError.PropertyName).Append(": ").AppendLine(dbValidationError.ErrorMessage);
|
||||
}
|
||||
}
|
||||
message = messageBuilder.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(EventTypeIds.ScheduledTasksException, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace);
|
||||
message = ex.Message;
|
||||
}
|
||||
|
||||
if (ex.InnerException != null)
|
||||
{
|
||||
var innerException = ex.InnerException;
|
||||
if (innerException is UpdateException updateException)
|
||||
innerException = updateException.InnerException;
|
||||
|
||||
Log(EventTypeIds.ScheduledTasksExceptionWithInner, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, message, ex.StackTrace, innerException.GetType().Name, innerException.Message, innerException.StackTrace);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(EventTypeIds.ScheduledTasksException, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, message, ex.StackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<package id="ClosedXML" version="0.85.0" targetFramework="net45" />
|
||||
<package id="DocumentFormat.OpenXml" version="2.5" targetFramework="net45" />
|
||||
<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" />
|
||||
|
||||
Reference in New Issue
Block a user