From 93c56509e64cf7ac43036260037966433a65f553 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 26 Sep 2011 20:57:50 +0000 Subject: WinGui: Some refactoring of code that throws exceptions. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4256 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/frmMain.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'win/CS/frmMain.cs') diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index f7f859b2f..b1e5196fb 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -20,6 +20,7 @@ namespace Handbrake using HandBrake.ApplicationServices; using HandBrake.ApplicationServices.EventArgs; + using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Model.General; using HandBrake.ApplicationServices.Utilities; using HandBrake.ApplicationServices.Functions; @@ -227,7 +228,7 @@ namespace Handbrake catch (Exception ex) { if ((bool)result.AsyncState) - Main.ShowExceptiowWindow("Unable to check for updates, Please try again later.", ex.ToString()); + throw new GeneralApplicationException("Unable to check for updates.", "Please try again later. The service may currently be down or inaccessible. ", ex); } } @@ -2651,7 +2652,7 @@ namespace Handbrake } catch (Exception exc) { - Main.ShowExceptiowWindow("HandBrake was not able to shutdown properly. You may need to forcefully quit HandBrake CLI from TaskManager if it's still running.", exc.ToString()); + throw new GeneralApplicationException("HandBrake was not able to shutdown properly.", " You may need to forcefully quit HandBrake CLI from TaskManager if it's still running ", exc); } finally { -- cgit v1.2.3