[tomboy] Correct exception handling when loading corrupted note files
- From: Aaron Borden <adborden src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tomboy] Correct exception handling when loading corrupted note files
- Date: Sat, 25 Jun 2011 17:56:41 +0000 (UTC)
commit 5770662522219349b6c38ac8f1774d474c9e72bf
Author: Lukas Vacek <lucas vacek gmail com>
Date: Fri Jan 14 01:15:14 2011 +0100
Correct exception handling when loading corrupted note files
https://bugzilla.gnome.org/show_bug.cgi?id=639500
Signed-off-by: Aaron Borden <adborden live com>
Tomboy/NoteManager.cs | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/Tomboy/NoteManager.cs b/Tomboy/NoteManager.cs
index 8c8dc1f..280ff41 100644
--- a/Tomboy/NoteManager.cs
+++ b/Tomboy/NoteManager.cs
@@ -331,6 +331,19 @@ Ciao!");
Logger.Error ("Error parsing note XML, skipping \"{0}\": {1}",
file_path,
e.Message);
+ } catch (System.IO.IOException e) {
+ Logger.Error ("Note {0} can not be loaded - file corrupted?: {1}",
+ file_path,
+ e.Message);
+ Gtk.MessageDialog md =
+ new Gtk.MessageDialog(null,Gtk.DialogFlags.DestroyWithParent,
+ Gtk.MessageType.Error,
+ Gtk.ButtonsType.Close,
+ "Skipping a note.\n {0} can not be loaded - Error loading file!",
+ file_path
+ );
+ md.Run();
+ md.Destroy();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]