private void DisplayException(Exception ex, string caption = "Exception Caught")
        {
            //Version without unified automation
            //string messageToDisplay = ex.Message;
            //MessageBox.Show("Exception was raised : " + messageToDisplay, "Exception", MessageBoxButton.OK, MessageBoxImage.Error);

            UnifiedAutomation.UaBase.ExceptionDlg dlg = new ExceptionDlg();
            dlg.ShowDialog("Exception Caught", ex);
        }