+ } catch (Exception e) {
+ throw new ArgeoServerException("Cannot serialize " + obj, e);
+ } finally {
+ if (jsonGenerator != null)
+ try {
+ jsonGenerator.close();
+ } catch (IOException e) {
+ if (log.isTraceEnabled())
+ log.error("Cannot close JSON generator", e);
+ }
+ }
+ }