[chore:] logging for EditorWindow.axaml.cs
This commit is contained in:
@@ -10,6 +10,8 @@ public partial class EditorWindow : Window
|
|||||||
public string filename = "";
|
public string filename = "";
|
||||||
|
|
||||||
public EditorWindow(string filename = "")
|
public EditorWindow(string filename = "")
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
@@ -24,6 +26,8 @@ public partial class EditorWindow : Window
|
|||||||
MessageBox.Show(null, "Die Datei existiert nicht", "Fehler");
|
MessageBox.Show(null, "Die Datei existiert nicht", "Fehler");
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) { Logger.Log($"Error while : {ex.Message}",Logger.LogType.Error);}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnSave_OnClick(object? sender, RoutedEventArgs e)
|
private void BtnSave_OnClick(object? sender, RoutedEventArgs e)
|
||||||
@@ -38,6 +42,7 @@ public partial class EditorWindow : Window
|
|||||||
MessageBox.Show(null,
|
MessageBox.Show(null,
|
||||||
"Es ist ein Fehler aufgetreten. Bitte senden Sie ihn über git.mypapercloud.de/fierke/logofclient ein:\n" +
|
"Es ist ein Fehler aufgetreten. Bitte senden Sie ihn über git.mypapercloud.de/fierke/logofclient ein:\n" +
|
||||||
ex.StackTrace, "Fehler");
|
ex.StackTrace, "Fehler");
|
||||||
|
Logger.Log($"Error while : {ex.Message}",Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +60,7 @@ public partial class EditorWindow : Window
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Delete(filename);
|
File.Delete(filename);
|
||||||
} catch {}
|
} catch (Exception ex) { Logger.Log($"Error while : {ex.Message}",Logger.LogType.Error);}
|
||||||
|
|
||||||
MainWindow._instance.PopulateNavTree();
|
MainWindow._instance.PopulateNavTree();
|
||||||
Close();
|
Close();
|
||||||
|
|||||||
Reference in New Issue
Block a user