From: Justin D. <jde...@op...> - 2013-05-29 13:27:41
|
Hi Robin, Indeed, it looks like an oversight. Care to issue a pull request? -Justin On Wed, May 29, 2013 at 3:53 AM, Robin Pradel <rp...@iv...> wrote: > Hi,**** > > ** ** > > does anybody know, why the JDBCDatastore throws an RuntimeException when > catching an SQLException while updating features?**** > > **** > > JDBCDatastore#update(SimpleFeatureType, AttributeDescriptor[],Object[], > Filter, Connection):**** > > // ...**** > > if ( dialect instanceof PreparedStatementSQLDialect ) {**** > > try {**** > > PreparedStatement ps = updateSQLPS(featureType, attributes, values, filter, cx);**** > > try {**** > > ((PreparedStatementSQLDialect)dialect).onUpdate(ps, cx, featureType);**** > > ps.execute();**** > > }**** > > finally {**** > > closeSafe( ps );**** > > }**** > > } **** > > catch (SQLException e) {**** > > throw new RuntimeException( e ); // <-- HERE**** > > }**** > > }**** > > // ...**** > > ** ** > > In my opinion this behavior is not correct. It should behave like a > non-prepared statement a few lines below and throw an IOException.**** > > ** ** > > There are several lines that throw RuntimeExceptions instead of the origin > IOException or SQLException.**** > > ** ** > > Has somebody an explanation for that?**** > > ** ** > > Yours sincerely.**** > > ** ** > > Robin Pradel**** > > System Ingenieur**** > > IVU Traffic Technologies AG**** > > Bundesallee 88, D-12161 Berlin**** > > http://www.ivu.de**** > > ** ** > > ** ** > > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1 > _______________________________________________ > GeoTools-GT2-Users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. |