src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java

changeset 54
77e01cda5a40
parent 53
6a8498291606
child 57
1262b5433644
equal deleted inserted replaced
53:6a8498291606 54:77e01cda5a40
358 } 358 }
359 connection.commit(); 359 connection.commit();
360 } catch (SQLException ex) { 360 } catch (SQLException ex) {
361 LOG.warn("Database transaction failed (Code {}): {}", ex.getErrorCode(), ex.getMessage()); 361 LOG.warn("Database transaction failed (Code {}): {}", ex.getErrorCode(), ex.getMessage());
362 LOG.debug("Details: ", ex); 362 LOG.debug("Details: ", ex);
363 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unhandled Transaction Error - Code:" + ex.getErrorCode()); 363 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unhandled Transaction Error - Code: " + ex.getErrorCode());
364 connection.rollback(); 364 connection.rollback();
365 } 365 }
366 } catch (SQLException ex) { 366 } catch (SQLException ex) {
367 LOG.error("Severe Database Exception (Code {}): {}", ex.getErrorCode(), ex.getMessage()); 367 LOG.error("Severe Database Exception (Code {}): {}", ex.getErrorCode(), ex.getMessage());
368 LOG.debug("Details: ", ex); 368 LOG.debug("Details: ", ex);
369 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database Error - Code:" + ex.getErrorCode()); 369 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database Error - Code: " + ex.getErrorCode());
370 } 370 }
371 } 371 }
372 372
373 @Override 373 @Override
374 protected final void doGet(HttpServletRequest req, HttpServletResponse resp) 374 protected final void doGet(HttpServletRequest req, HttpServletResponse resp)

mercurial