On Mon, May 16, 2011 at 11:57 AM, Joachim Van der Auwera
<[email protected]> wrote:
> Right I get it. Throwable seem to make sense in this case.
> Sonar won't like the "catch Throwable", would need a "// NOPMD" or "//
> NOSONAR" comment.
Ok, summing up all the contents I guess something like this might be good:
try {
....
} catch (Throwable e) { //NOSONAR
// close the connection
getDataStore().closeSafe(cx);
// safely rethrow
if(e instanceof Error) {
throw (Error) e;
} else {
throw (IOException) new IOException().initCause(e);
}
}
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel