Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-11-29 10:38:27 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-11-29 10:38:27 +0400
commitef416d991118fa04d6f9c3c3556808b8f824ece4 (patch)
tree1521eda022270ef45996244198fc04d53564a1da /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
parent27c841c8a62d71b7359e1940812f4c276074a869 (diff)
[Ide] Handled error during print preview more nicely.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
index 78bdb5f2e2..16096b39b1 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
@@ -228,7 +228,12 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
- IdeApp.Workbench.ActiveDocument.GetContent<IPrintable> ().PrintPreviewDocument (PrintingSettings.Instance);
+ try {
+ IdeApp.Workbench.ActiveDocument.GetContent<IPrintable> ().PrintPreviewDocument (PrintingSettings.Instance);
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while generating the print preview", e);
+ MessageService.ShowError (GettextCatalog.GetString ("Error while generating the print preview"), e.Message);
+ }
}
protected override void Update (CommandInfo info)