-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.cs
40 lines (36 loc) · 1.11 KB
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Text;
namespace MiniDumpStartupHook
{
internal static class Settings
{
public static string Path { get; private set; }
public static string[] ExceptionTypes { get; private set; }
static Settings()
{
try
{
Path = Environment.GetEnvironmentVariable("MINIDUMP_PATH");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
string exceptionTypes = null;
try
{
exceptionTypes = Environment.GetEnvironmentVariable("MINIDUMP_EXCEPTIONTYPES");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
if (string.IsNullOrWhiteSpace(exceptionTypes))
{
exceptionTypes = "BadImageFormatException;AccessViolationException;ApplicationException;ExecutionEngineException";
}
ExceptionTypes = exceptionTypes.Split(';', StringSplitOptions.RemoveEmptyEntries);
}
}
}