|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-09 20:49:25
|
[ http://jira.springframework.org/browse/RCP-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-481:
-----------------------------
Fix Version/s: 1.0.2
> Exceptions disappear in ApplicationLauncher
> -------------------------------------------
>
> Key: RCP-481
> URL: http://jira.springframework.org/browse/RCP-481
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Components: Application Framework
> Affects Versions: 1.0.0
> Reporter: Theo Gülcher
> Assignee: Lieven Doclo
> Priority: Trivial
> Fix For: 1.0.2
>
>
> http://forum.springframework.org/showthread.php?t=40931
> ---------------------------------------------------------------------------------
> Hi,
> I discovered some strange behavior at startup of my application. After the splash screen became visible it suddenly disappeared and I did not see any exception.
> I discovered that the following piece of code was responsible for hiding any exceptions:
> Code:
> public ApplicationLauncher(String startupContextPath, String[] rootContextConfigLocations) {
> .....
> .....
> try {
> setRootApplicationContext(loadRootApplicationContext(rootContextConfigLocations, startupContext));
> launchMyRichClient();
> }
> finally {
> destroySplashScreen();
> }
> }
> I think this code is very wrong, because any exceptions in the try block would just be swallowed without showing an exception in your console or log file, so I added a catch block, like this:
> Code:
> public ApplicationLauncher(String startupContextPath, String[] rootContextConfigLocations) {
> .....
> .....
> try {
> setRootApplicationContext(loadRootApplicationContext(rootContextConfigLocations, startupContext));
> launchMyRichClient();
> }
> catch (Exception e) {
> logger.error("Application launcher", e);
> }
> finally {
> destroySplashScreen();
> }
> }
> After that I discovered I had some exceptions in my spring xml configuration.
> Maybe a good idea if any of the contributors/submitters would change this in SVN?
> Thanks in advance,
> Theo.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|