On Mon, Mar 16, 2009 at 12:22 PM, Andrea Aime <[email protected]> wrote:
> Hi,
> wondering if anyone looked in consistent and decent looking
> error reporting for the Wicket UI, in particular for those
> errors that are not recoverable.
> Consider this fragment of code:
>
> CoverageStoreInfo cstore = (CoverageStoreInfo) store;
> CatalogBuilder builder = new CatalogBuilder(getCatalog());
> builder.setStore(store);
> AbstractGridCoverage2DReader reader = (AbstractGridCoverage2DReader)
> (cstore.getFormat()).getReader(cstore.getURL());
> try {
>     CoverageInfo ci = builder.buildCoverage(reader);
> } catch(Exception e) {
>     // hmmm.. what now???
> }
>
> The exception the builder throws is not recoverable,
> we can only admit defeat and give up... but we should
> do that in style, giving the user something to read and the
> devs something to look at for debugging purposes.
>
> I guess I'd like to have an exception be thrown, and
> have some hook somewhere in wicket that take it,
> lookup a i18n error message using a key and an
> Object[] for params, reports the message, and
> provide provide a copy/paste friendly section
> for the full stack trace.
>

Hi,
I saw this and thought I would chime in. Even though I am a complete
noob at geoserver I have a bunch of wicket experience and love the
framework. If you already know this I apologize. Wicket has a
completely pluggable api for exception handling, although the hooks
are in various places. You can set pages for various kinds of errors
on the Apllication itself, or override onRuntimeException in
WebRequestCycle. Additionally, if you have the configuration param for
wicket filter set to DEVELOPMENT in the web.xml, the developer will
get pages with a nicely formatted stack trace. This page provides
comprehensive information:
http://cwiki.apache.org/confluence/display/WICKET/Error+Pages+and+Feedback+Messages.

hth,
jim

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to