language editor: display error message with stacktrace in case of unexpected exception

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2180 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
JKlingen 2012-10-21 09:37:13 +00:00
parent a090e3e8d6
commit ea52882bd3
2 changed files with 16 additions and 6 deletions

View file

@ -15,6 +15,7 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using Greenshot.Helpers;
namespace GreenshotLanguageEditor
{
@ -23,11 +24,14 @@ namespace GreenshotLanguageEditor
/// </summary>
public partial class ErrorWindow : Window
{
public ErrorWindow(string msg)
public ErrorWindow(Exception e)
{
InitializeComponent();
this.Title = "Unexpected Error in GreenshotLanguageEditor";
this.textBox.Text = msg;
this.textBox.Text = "Sorry, an unexpected error occurred :(\n\n"
+ EnvironmentInfo.BuildReport(e);
}
}
}