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" />
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Interop.DiscoServices;
|
||||
using Exceptionless;
|
||||
using Exceptionless.Configuration;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
[assembly: Exceptionless("https://errors.discoict.com.au", "c81e644582374f68aaf1fb546e3db0cd")]
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
public static class AppConfig
|
||||
@@ -31,8 +27,6 @@ namespace Disco.Web
|
||||
|
||||
public static void InitalizeCoreEnvironment(DiscoDataContext Database)
|
||||
{
|
||||
ExceptionlessClient.Current.SendingError += Exceptionless_SendingError;
|
||||
|
||||
// Initialize Logging
|
||||
Disco.Services.Logging.LogContext.Initalize(Database, DiscoApplication.SchedulerFactory);
|
||||
|
||||
@@ -54,14 +48,6 @@ namespace Disco.Web
|
||||
Disco.Services.Users.UserService.Initialize(Database);
|
||||
}
|
||||
|
||||
static void Exceptionless_SendingError(object sender, ErrorModelEventArgs e)
|
||||
{
|
||||
e.Error.UserName = DiscoApplication.DeploymentId;
|
||||
e.Error.UserDescription = DiscoApplication.OrganisationName;
|
||||
|
||||
e.Error.Tags.Add(string.Concat("v", DiscoApplication.Version));
|
||||
}
|
||||
|
||||
public static void InitalizeNormalEnvironment(DiscoDataContext Database)
|
||||
{
|
||||
InitalizeCoreEnvironment(Database);
|
||||
|
||||
@@ -15,7 +15,6 @@ using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Plugins.Features.WarrantyProvider;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
using Exceptionless;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -592,7 +591,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogWarrantyError, m);
|
||||
throw;
|
||||
@@ -607,7 +605,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogWarrantyError, m);
|
||||
}
|
||||
@@ -630,7 +627,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogWarrantyError, m);
|
||||
throw;
|
||||
@@ -675,7 +671,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
model.JobDetailsSupported = false;
|
||||
model.JobDetailsException = ex;
|
||||
return View(model);
|
||||
@@ -778,7 +773,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogRepairError, m);
|
||||
throw;
|
||||
@@ -793,7 +787,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogRepairError, m);
|
||||
}
|
||||
@@ -816,7 +809,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
m.Error = ex;
|
||||
return View(Views.LogRepairError, m);
|
||||
throw;
|
||||
@@ -861,7 +853,6 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.ToExceptionless().Submit();
|
||||
model.JobDetailsSupported = false;
|
||||
model.JobDetailsException = ex;
|
||||
return View(model);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<RestorePackages>true</RestorePackages>
|
||||
<UseGlobalApplicationHostFile />
|
||||
<Use64BitIISExpress />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -45,15 +47,6 @@
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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="Exceptionless.Mvc">
|
||||
<HintPath>..\packages\Exceptionless.Mvc.1.5.2092\lib\net45\Exceptionless.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MarkdownSharp">
|
||||
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<modules runAllManagedModulesForAllRequests="true">
|
||||
<add name="ExceptionlessModule" type="Exceptionless.Mvc.ExceptionlessModule, Exceptionless.Mvc" />
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
<package id="DotNet.Highcharts" version="4.0" targetFramework="net45" />
|
||||
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
|
||||
<package id="EntityFramework.SqlServerCompact" version="4.3.6" targetFramework="net45" />
|
||||
<package id="Exceptionless" version="1.5.2092" targetFramework="net45" />
|
||||
<package id="Exceptionless.Mvc" version="1.5.2092" targetFramework="net45" />
|
||||
<package id="FontAwesome" version="4.1.0" targetFramework="net45" />
|
||||
<package id="jQuery" version="2.1.1" targetFramework="net45" />
|
||||
<package id="jQuery.UI.Combined" version="1.10.4" targetFramework="net45" />
|
||||
|
||||
Reference in New Issue
Block a user