Revision: 3996
Author: [email protected]
Date: Thu Nov 25 13:57:13 2010
Log: A small addition to the previous commit; further improving the
handling of the UI so it is re-enabled when an error occurs.
http://code.google.com/p/power-architect/source/detail?r=3996
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/CompareDMPanel.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/CompareDMPanel.java
Thu Nov 25 13:33:37 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/swingui/CompareDMPanel.java
Thu Nov 25 13:57:13 2010
@@ -1298,6 +1298,9 @@
ASUtils.showExceptionDialogNoReport(CompareDMPanel.this,
Messages.getString("CompareDMPanel.couldNotReadFile"), ex); //$NON-NLS-1$
logger.error("Could not read file", ex);
//$NON-NLS-1$
return;
+ } catch (RuntimeException ex) {
+ reenableGUIComponents();
+ throw new RuntimeException(ex);
}
compareWorker = new SPSwingWorker(session) {
@@ -1345,6 +1348,9 @@
} catch (CancellationException e) {
reenableGUIComponents();
setFinished(true);
+ } catch (RuntimeException ex) {
+ reenableGUIComponents();
+ throw new RuntimeException(ex);
}
}
@@ -1374,7 +1380,6 @@
}
logger.debug("cleanup finished"); //$NON-NLS-1$
} catch (CancellationException e) {
- reenableGUIComponents();
setFinished(true);
} finally {
reenableGUIComponents();