[ease] Log when SlideButtons error while drawing.



commit 2216bde2e9a737abc9df47a0840d94170fd36663
Author: Nate Stedman <natesm gmail com>
Date:   Fri Jun 11 03:09:15 2010 -0400

    Log when SlideButtons error while drawing.
    
    Fixes valac warning.

 src/SlideButton.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/SlideButton.vala b/src/SlideButton.vala
index ea4772d..f793812 100644
--- a/src/SlideButton.vala
+++ b/src/SlideButton.vala
@@ -123,7 +123,11 @@ public class Ease.SlideButton : Gtk.Button
 		              ((float)allocation.height) / slide.parent.height);
 		
 		// write the slide
-		PDFExporter.write_slide(slide, context);
+		try { PDFExporter.write_slide(slide, context); }
+		catch (Error e)
+		{
+			log("", LogLevelFlags.LEVEL_WARNING, "%s\n", e.message);
+		}
 		context.restore();
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]