Internal code cleanup

This commit is contained in:
Anton Kasyanov
2019-02-25 22:03:11 +02:00
parent a4e46c27bd
commit 7bc2775fb7
9 changed files with 39 additions and 45 deletions

View File

@@ -12,8 +12,8 @@ namespace EveOPreview
// So this dumb and non elegant approach is used
sealed class ExceptionHandler
{
private const string ExceptionDumpFileName = "EVE-O Preview.log";
private const string ExceptionMessage = "EVE-O Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file.";
private const string EXCEPTION_DUMP_FILE_NAME = "EVE-O Preview.log";
private const string EXCEPTION_MESSAGE = "EVE-O Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file.";
public void SetupExceptionHandlers()
{
@@ -39,9 +39,9 @@ namespace EveOPreview
try
{
String exceptionMessage = exception.ToString();
File.WriteAllText(ExceptionHandler.ExceptionDumpFileName, exceptionMessage);
File.WriteAllText(ExceptionHandler.EXCEPTION_DUMP_FILE_NAME, exceptionMessage);
MessageBox.Show(ExceptionHandler.ExceptionMessage, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(ExceptionHandler.EXCEPTION_MESSAGE, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch
{