Code example for SQLException

Methods: printStackTrace

0
		int id = 0;
		try { 
			id = this.insertAndReturnPrimaryId("psi_receipt", data);
			LOG.info("新增单据成功"); 
		} catch (SQLException e) {
			LOG.error("新增单据时出错", e);
			e.printStackTrace();
		} 
		return id;
	} 
	 
	public List<Map<String, Object>> queryAllReceipt(List<Object> params) {
		List<Map<String, Object>> datas = null;
		String sql = "select * from psi_receipt r order by r.id desc limit ? , ?";
		try { 
			datas = this.executeQueryMultiple(sql, params);
		} catch (SQLException e) {
			e.printStackTrace();
		} 
		return datas;
Stop searching for code, let great code find you!  Add Codota to your java IDE