Revision: 3661
Author: [email protected]
Date: Wed Jun 30 13:40:21 2010
Log: Corrected the display of exceptions when profiling failed. The copied
object updated on the background thread was not updating the actual object
because the exception was thrown early.
http://code.google.com/p/power-architect/source/detail?r=3661
Modified:
/trunk/src/main/java/ca/sqlpower/architect/profile/ProfileManagerImpl.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/profile/ProfileManagerImpl.java
Wed Jun 23 11:55:57 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/profile/ProfileManagerImpl.java
Wed Jun 30 13:40:21 2010
@@ -240,10 +240,6 @@
throw actualTPR.getException();
}
creator.doProfile(tpr);
- // XXX the creator should stash a reference to the exception
in tpr, then throw it anyway
- if (tpr.getException() != null) {
- throw tpr.getException();
- }
Runnable runner = new Runnable() {
public void run() {
//None of the profiling creates or saves any data
source information so an
@@ -269,6 +265,11 @@
} catch (SessionNotFoundException e) {
runner.run();
}
+
+ if (tpr.getException() != null) {
+ throw tpr.getException();
+ }
+
return actualTPR;
}
}