Merge branch 'feature/sentry' into milestone/first_release
* feature/sentry: Added Sentry integration
This commit is contained in:
commit
0ddefc4023
|
@ -12,6 +12,8 @@ using DML.AppCore.Classes;
|
|||
using DML.Application.Dialogs;
|
||||
using DML.Client;
|
||||
using LiteDB;
|
||||
using SharpRaven;
|
||||
using SharpRaven.Data;
|
||||
using SweetLib.Utils;
|
||||
using SweetLib.Utils.Logger;
|
||||
using SweetLib.Utils.Logger.Memory;
|
||||
|
@ -25,6 +27,7 @@ namespace DML.Application.Classes
|
|||
internal static LiteDatabase Database { get; set; }
|
||||
internal static Settings Settings { get; set; }
|
||||
internal static JobScheduler Scheduler { get; } = new JobScheduler();
|
||||
internal static RavenClient Raven = new RavenClient("https://0de964231669473e9098b9f6cc1d6278:79d9f2eb24034de199b2a37cc058e0f2@sentry.io/257114");
|
||||
|
||||
internal static string DataDirectory
|
||||
=> Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Serraniel\Discord Media Loader");
|
||||
|
@ -268,6 +271,8 @@ namespace DML.Application.Classes
|
|||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error($"{ex.Message} occured at: {ex.StackTrace}");
|
||||
if (MessageBox.Show($"An error occured while running Discord Media Loader:\n{ex.GetType().Name}: {ex.Message}\n\nDo you aggree to sending the error report to the creator of the tool?", "Discord Media Loader", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
Raven.Capture(new SentryEvent(ex));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,6 +80,9 @@
|
|||
<HintPath>..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SharpRaven, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpRaven.2.2.0\lib\net45\SharpRaven.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
|
||||
|
|
|
@ -48,15 +48,15 @@
|
|||
this.statusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this.pgbProgress = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.lbProgress = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lblVersionPlaceholder = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lbVersion = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.btnDropDown = new System.Windows.Forms.ToolStripSplitButton();
|
||||
this.visitGithubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.btnDelete = new System.Windows.Forms.Button();
|
||||
this.lbxJobs = new System.Windows.Forms.ListBox();
|
||||
this.tmrRefreshProgress = new System.Windows.Forms.Timer(this.components);
|
||||
this.lblVersionPlaceholder = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lbVersion = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.btnDropDown = new System.Windows.Forms.ToolStripSplitButton();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.visitGithubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pnlSettings.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edThreadLimit)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
|
@ -257,6 +257,43 @@
|
|||
this.lbProgress.Name = "lbProgress";
|
||||
this.lbProgress.Size = new System.Drawing.Size(0, 17);
|
||||
//
|
||||
// lblVersionPlaceholder
|
||||
//
|
||||
this.lblVersionPlaceholder.Name = "lblVersionPlaceholder";
|
||||
this.lblVersionPlaceholder.Size = new System.Drawing.Size(302, 17);
|
||||
this.lblVersionPlaceholder.Spring = true;
|
||||
//
|
||||
// lbVersion
|
||||
//
|
||||
this.lbVersion.Name = "lbVersion";
|
||||
this.lbVersion.Size = new System.Drawing.Size(118, 17);
|
||||
this.lbVersion.Text = "v https://github.com";
|
||||
//
|
||||
// btnDropDown
|
||||
//
|
||||
this.btnDropDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDropDown.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.visitGithubToolStripMenuItem,
|
||||
this.aboutToolStripMenuItem});
|
||||
this.btnDropDown.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnDropDown.Name = "btnDropDown";
|
||||
this.btnDropDown.Size = new System.Drawing.Size(16, 20);
|
||||
this.btnDropDown.Text = "Options";
|
||||
//
|
||||
// visitGithubToolStripMenuItem
|
||||
//
|
||||
this.visitGithubToolStripMenuItem.Name = "visitGithubToolStripMenuItem";
|
||||
this.visitGithubToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.visitGithubToolStripMenuItem.Text = "Visit Github";
|
||||
this.visitGithubToolStripMenuItem.Click += new System.EventHandler(this.visitGithubToolStripMenuItem_Click);
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.aboutToolStripMenuItem.Text = "About";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.btnDelete);
|
||||
|
@ -297,43 +334,6 @@
|
|||
this.tmrRefreshProgress.Interval = 500;
|
||||
this.tmrRefreshProgress.Tick += new System.EventHandler(this.tmrRefreshProgress_Tick);
|
||||
//
|
||||
// lblVersionPlaceholder
|
||||
//
|
||||
this.lblVersionPlaceholder.Name = "lblVersionPlaceholder";
|
||||
this.lblVersionPlaceholder.Size = new System.Drawing.Size(271, 17);
|
||||
this.lblVersionPlaceholder.Spring = true;
|
||||
//
|
||||
// lbVersion
|
||||
//
|
||||
this.lbVersion.Name = "lbVersion";
|
||||
this.lbVersion.Size = new System.Drawing.Size(118, 17);
|
||||
this.lbVersion.Text = "v https://github.com";
|
||||
//
|
||||
// btnDropDown
|
||||
//
|
||||
this.btnDropDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDropDown.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.visitGithubToolStripMenuItem,
|
||||
this.aboutToolStripMenuItem});
|
||||
this.btnDropDown.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnDropDown.Name = "btnDropDown";
|
||||
this.btnDropDown.Size = new System.Drawing.Size(16, 20);
|
||||
this.btnDropDown.Text = "Options";
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.aboutToolStripMenuItem.Text = "About";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||
//
|
||||
// visitGithubToolStripMenuItem
|
||||
//
|
||||
this.visitGithubToolStripMenuItem.Name = "visitGithubToolStripMenuItem";
|
||||
this.visitGithubToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.visitGithubToolStripMenuItem.Text = "Visit Github";
|
||||
this.visitGithubToolStripMenuItem.Click += new System.EventHandler(this.visitGithubToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Forms;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -15,6 +15,7 @@
|
|||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" />
|
||||
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net461" />
|
||||
<package id="RestSharp" version="105.2.3" targetFramework="net461" />
|
||||
<package id="SharpRaven" version="2.2.0" targetFramework="net461" />
|
||||
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in a new issue