diff --git a/Binary/CLI.cs b/Binary/CLI.cs index 0381a64..5a74289 100644 --- a/Binary/CLI.cs +++ b/Binary/CLI.cs @@ -89,7 +89,7 @@ public void ImportEndscript(string path) catch (Exception ex) { - var error = $"Error has occured -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + + var error = $"Error has occurred -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + Environment.NewLine + $"Command: [{parser.CurrentLine}]" + Environment.NewLine + $"Error: {ex.GetLowestMessage()}"; diff --git a/Binary/Editor.cs b/Binary/Editor.cs index 3ef1eac..36a3e56 100644 --- a/Binary/Editor.cs +++ b/Binary/Editor.cs @@ -494,7 +494,7 @@ private void EMSMainImportEndscript_Click(object sender, EventArgs e) catch (Exception ex) { - var error = $"Error has occured -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + + var error = $"Error has occurred -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + Environment.NewLine + $"Command: [{parser.CurrentLine}]" + Environment.NewLine + $"Error: {ex.GetLowestMessage()}"; @@ -790,7 +790,7 @@ private void EMSScriptingRunAll_Click(object sender, EventArgs e) catch (Exception ex) { - var error = $"Error has occured -> Line: {count}" + Environment.NewLine + + var error = $"Error has occurred -> Line: {count}" + Environment.NewLine + $"Command: [{command}]" + Environment.NewLine + $"Error: {ex.GetLowestMessage()}"; MessageBox.Show(error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/Binary/IntroUI.cs b/Binary/IntroUI.cs index cca8f9c..cba39f7 100644 --- a/Binary/IntroUI.cs +++ b/Binary/IntroUI.cs @@ -164,7 +164,7 @@ private void UserInteract() catch (Exception ex) { - var error = $"Error has occured -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + + var error = $"Error has occurred -> File: {parser.CurrentFile}, Line: {parser.CurrentIndex}" + Environment.NewLine + $"Command: [{parser.CurrentLine}]" + Environment.NewLine + $"Error: {ex.GetLowestMessage()}"; diff --git a/Binary/Program.cs b/Binary/Program.cs index 076996e..abd6a4b 100644 --- a/Binary/Program.cs +++ b/Binary/Program.cs @@ -146,7 +146,7 @@ public static void ThreadExceptionHandler(object sender, ThreadExceptionEventArg logger.WriteException(e.Exception); #if DEBUG - MessageBox.Show("Unexpected error has occured. Please send MainLog.txt " + + MessageBox.Show("Unexpected error has occurred. Please send MainLog.txt " + "file to developer (MaxHwoy). Right now Binary will export all your " + "collections to an autogenerated folder so you won't lose your data.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -178,7 +178,7 @@ public static void ThreadExceptionHandler(object sender, ThreadExceptionEventArg #else - MessageBox.Show($"Unexpected error has occured: {e.Exception.GetLowestMessage()}", "Error", + MessageBox.Show($"Unexpected error has occurred: {e.Exception.GetLowestMessage()}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); #endif