159160161162163164165166167168169
catch (Throwable t){ return t.getLocalizedMessage(); // We cannot connect because of this ... } finally { if( datastore != null){ datastore.dispose(); } } } return null; // apparently we can connect }
255256257258259260261262263264265
LOGGER.log(Level.WARNING, "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe); throw new ServiceException(ioe); } finally { if(dstore != null) { dstore.dispose(); } } return file; }
208209210211212213214215216217218
JDBCUtils.close(st); JDBCUtils.close(conn, null, null); // very important, or we'll leak connection pools during // execution if (ds != null) ds.dispose(); if (reader != null) reader.close(); } }
898899900901902903904905906907908
} } catch (Exception ex) { ex.printStackTrace(); } finally { if (ds != null) { ds.dispose(); } if (succeeed) { JOptionPane.showMessageDialog(this, "Succeed!"); } else { JOptionPane.showMessageDialog(this, "Failed!");
56575859606162636465
"No features types were found in the specified database."); } } catch (GeoToolsOpException e) { throw new CommandFailedException("Unable to get feature types from the database.", e); } finally { dataStore.dispose(); cli.getConsole().flush(); } } }
6061626364656667686970
"No features types were found in the specified database."); } } catch (GeoToolsOpException e) { throw new CommandFailedException("Unable to get feature types from the database."); } finally { dataStore.dispose(); cli.getConsole().flush(); } } }
121122123124125126127128129130131
} } catch (IOException e) { throw new IllegalStateException("Cannot connect to database: " + e.getMessage(), e); } finally { if (dataStore != null) { dataStore.dispose(); } } } }
119120121122123124125126127128
default: throw new CommandFailedException("Import failed with exception: " + e.statusCode.name(), e); } } finally { dataStore.dispose(); cli.getConsole().flush(); } } }
120121122123124125126127128129
57585960616263646566