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.
First off, what other devs think of this idea?
And does anyone know if it's actually doable?
If no one already knows, I'll look it up.
The important point is more to have a consistent
way to deal with these cases, so I'm looking forward
to hear about options on this one.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.