summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/workben/vcldemo.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 46538cb732bc..e56d95c9d393 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -730,10 +730,23 @@ public:
virtual int Main() SAL_OVERRIDE
{
- DemoWin aMainWin;
- aMainWin.SetText( "Interactive VCL demo" );
- aMainWin.Show();
- Application::Execute();
+ try
+ {
+ DemoWin aMainWin;
+ aMainWin.SetText( "Interactive VCL demo" );
+ aMainWin.Show();
+ Application::Execute();
+ }
+ catch (const css::uno::Exception& e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ return 1;
+ }
+ catch (const std::exception& e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.what());
+ return 1;
+ }
return 0;
}