added exception handler/dumper
This commit is contained in:
parent
79dcc39826
commit
892cd40895
3 changed files with 17 additions and 2 deletions
|
@ -17,9 +17,24 @@ namespace WeeXnes
|
|||
/// </summary>
|
||||
public partial class App
|
||||
{
|
||||
private void SetExceptionHandler()
|
||||
{
|
||||
AppDomain currentDomain = default(AppDomain);
|
||||
currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.UnhandledException += GlobalUnhandledExceptionHandler;
|
||||
}
|
||||
private static void GlobalUnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
Exception ex = (Exception)e.ExceptionObject;
|
||||
using (StreamWriter writer = new StreamWriter("error_log.txt"))
|
||||
{
|
||||
writer.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
private void App_OnStartup(object sender, StartupEventArgs e)
|
||||
{
|
||||
Environment.CurrentDirectory = Application.StartupPath;
|
||||
SetExceptionHandler();
|
||||
CheckForDebugMode();
|
||||
CheckUpdatedFiles();
|
||||
CheckForFolder();
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace WeeXnes.Core
|
|||
{
|
||||
public class Information
|
||||
{
|
||||
public const string Version = "4.3.1";
|
||||
public const string Version = "4.3.2";
|
||||
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
||||
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Version>4.3.1</Version>
|
||||
<Version>4.3.2</Version>
|
||||
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>WeeXnes</RootNamespace>
|
||||
|
|
Loading…
Add table
Reference in a new issue