Bogdan Stefanescu | 8 Aug 12:33

Re: Exceptions handling

Sun Seng David TAN wrote:
> Hi Apogee devs,
>
> It's time to think about errors and exception handling in Apogee. The 
> purpose of this discussion is to get rid of "printstacktrack" way to 
> easily avoid the problem and find a new and simple way to warm the 
> user and give good information for the developpers if debugging is 
> needed.
>
> To start the discussion, in a first glance, Alain said :
> "I guess all the exceptions should be thrown to the top so that there 
> is systematically a UI signal when something is wrong ... "
>
> I think we have few ways to handle exception :
> • logging -> reuse existing nuxeo way to handle them (log4j) ?
> • display to user -> IStatus (the message it self and status) and 
> ErrorDialog, maybe in the Status bar as well.
>
Logging should be done using slf4j or apache.logging API as in nuxeo 
ecm. (nuxeo runtime and other core plugins already use this)
To be able top use logging you need to have org.nuxeo.logging in your 
plugin dependencies.

Displaying errors to user should be done using 
org.nuxeo.eclipse.ui.utils.UI.showError().
I think there is a bug in this method and the stack trace is not 
displayed in the dialog - can you look at this Sun?

> I think Apogee should have its own way to deal with exception. Because 
> it is supposed to handle not only nuxeo, we should embed nuxeo handled 
> exception from coming the core.
>
> Any idea is welcome :)
>
> Sun.
>
>
>
>
> _______________________________________________
> Apogee mailing list
> Apogee@...
> http://lists.nuxeo.com/mailman/listinfo/apogee
>

Gmane