Hi Roger, I attached patch to JIRA issue.
Regards Karel -----Original Message----- From: Roger Whitcomb [mailto:rogerandb...@rbwhitcomb.com] Sent: Monday, August 12, 2013 11:04 PM To: dev@pivot.apache.org Subject: Re: [jira] [Created] (PIVOT-916) Replace DesktopApplicationContext.displayException calls with ApplicationContext.handleUncaughtException Hi Karel, Do you think you could prepare a patch for this? It sounds reasonable to me, but would want to look at the implications. Thanks, ~Roger Whitcomb On Aug 12, 2013, at 1:26 AM, Karel Hübl (JIRA) <j...@apache.org> wrote: > Karel Hübl created PIVOT-916: > -------------------------------- > > Summary: Replace DesktopApplicationContext.displayException calls > with ApplicationContext.handleUncaughtException > Key: PIVOT-916 > URL: https://issues.apache.org/jira/browse/PIVOT-916 > Project: Pivot > Issue Type: Improvement > Reporter: Karel Hübl > > > There should be consistent way to handle uncaught exceptions in Pivot > applications. > > However uncaught exceptions thrown in DesktopApplicationContext class (for > example in application.startup ) are handled using private static method > displayException, which displays dialog and its logic cannot be overriden. > > May be ApplicationContext.handleUncaughtException could be made protected and > calls to DesktopApplicationContext.displayException could be replaced by > ApplicationContext.handleUncaughtException. And possibly Application.Adapter > could implement UncaughtExceptionHandler - so current > DesktopApplicationContext.displayException logic could be moved to new > Application.Adapter.uncaughtExceptionThrown method. > > This should enable to override uncaught exception handling globally in pivot > applications. > > Motivation: > > We deploy Pivot app using Java Web Start. Users have by default disabled Java > Console (and they are not familiar with it). We want to display custom dialog > to handle uncaught exceptions displaying full stack trace and with possiblity > to report exception to help desk. > I think, in current implementation it is not possible to override handling of > uncaught exceptions thrown during application init and other specific > situations. > > > > > > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators For more information on JIRA, see: > http://www.atlassian.com/software/jira >