[pdfmod] Don't crash if unable to save (bgo#633125)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pdfmod] Don't crash if unable to save (bgo#633125)
- Date: Mon, 25 Oct 2010 19:26:02 +0000 (UTC)
commit fb88150d109b638c1a0a8c44d6e02a8b21c3eba8
Author: Gabriel Burt <gabriel burt gmail com>
Date: Mon Oct 25 14:25:10 2010 -0500
Don't crash if unable to save (bgo#633125)
src/PdfMod/Gui/Actions.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/PdfMod/Gui/Actions.cs b/src/PdfMod/Gui/Actions.cs
index 276a0e5..2a7524e 100644
--- a/src/PdfMod/Gui/Actions.cs
+++ b/src/PdfMod/Gui/Actions.cs
@@ -251,8 +251,12 @@ namespace PdfMod.Gui
void OnSave (object o, EventArgs args)
{
- app.Document.Save (app.Document.SuggestedSavePath);
- undo_manager.Clear ();
+ try {
+ app.Document.Save (app.Document.SuggestedSavePath);
+ undo_manager.Clear ();
+ } catch (Exception e) {
+ Log.Error (Catalog.GetString ("Unable to Save Document"), e.Message, true);
+ }
}
void OnSaveAs (object o, EventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]