Permalink
Browse files

[jdbc-driver] Simplified exception message (1.0.16-1)

  • Loading branch information...
cchantep
cchantep committed Mar 9, 2014
1 parent c1a3e19 commit bf89ecec5b9b1645c347c32cf334475e39e4155c
@@ -169,7 +169,7 @@ public ResultSet executeQuery(final String sql) throws SQLException {
} catch (SQLException se) {
throw se;
} catch (Exception e) {
throw new SQLException(e);
throw new SQLException(e.getMessage(), e);
} // end of catch
} // end of executeQuery
@@ -503,7 +503,7 @@ public int executeUpdate(final String sql, final int autoGeneratedKeys)
} catch (SQLException se) {
throw se;
} catch (Exception e) {
throw new SQLException(e);
throw new SQLException(e.getMessage(), e);
} // end of catch
} // end of update
@@ -176,7 +176,7 @@ public ResultSet executeQuery() throws SQLException {
} catch (SQLException se) {
throw se;
} catch (Exception e) {
throw new SQLException(e);
throw new SQLException(e.getMessage(), e);
} // end of catch
} // end of executeQuery
@@ -232,7 +232,7 @@ public int executeUpdate() throws SQLException {
} catch (SQLException se) {
throw se;
} catch (Exception e) {
throw new SQLException(e);
throw new SQLException(e.getMessage(), e);
} // end of catch
} // end of update
@@ -167,10 +167,11 @@ final class ScalaCompositeHandler(qd: Array[Pattern], qh: QueryHandler, uh: Upda
* }
* }}}
*/
def withQueryHandler(h: QueryExecution QueryResult): ScalaCompositeHandler = new ScalaCompositeHandler(queryDetection, new QueryHandler {
def apply(sql: String, p: JList[Parameter]): QueryResult =
h(QueryExecution(sql, scalaParameters(p)))
}, updateHandler)
def withQueryHandler(h: QueryExecution QueryResult) =
new ScalaCompositeHandler(queryDetection, new QueryHandler {
def apply(sql: String, p: JList[Parameter]): QueryResult =
h(QueryExecution(sql, scalaParameters(p)))
}, updateHandler)
/**
* Returns handler that delegates update execution to |h| function.
@@ -194,10 +195,11 @@ final class ScalaCompositeHandler(qd: Array[Pattern], qh: QueryHandler, uh: Upda
* }
* }}}
*/
def withUpdateHandler(h: UpdateExecution UpdateResult): ScalaCompositeHandler = new ScalaCompositeHandler(queryDetection, queryHandler, new UpdateHandler {
def apply(sql: String, p: JList[Parameter]): UpdateResult =
h(UpdateExecution(sql, scalaParameters(p)))
})
def withUpdateHandler(h: UpdateExecution UpdateResult) =
new ScalaCompositeHandler(queryDetection, queryHandler, new UpdateHandler {
def apply(sql: String, p: JList[Parameter]): UpdateResult =
h(UpdateExecution(sql, scalaParameters(p)))
})
private def scalaParameters(p: JList[Parameter]): List[ExecutedParameter] =
JavaConversions.collectionAsScalaIterable(p).
View
@@ -9,7 +9,7 @@ object Acolyte extends Build with Dependencies
aggregate(jdbcDriver, scalacPlugin, jdbcScala, studio).
settings(
organization in ThisBuild := "org.eu.acolyte",
version in ThisBuild := "1.0.16",
version in ThisBuild := "1.0.16-1",
javaOptions in ThisBuild ++= Seq("-source", "1.6", "-target", "1.6"),
scalaVersion in ThisBuild := "2.10.3",
publishTo in ThisBuild := Some(Resolver.file("file",
View
@@ -10,7 +10,7 @@ trait JdbcDriver { deps: Dependencies ⇒
scalacOptions += "-feature",
resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/",
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-lang3" % "3.2.1", specs2Test),
"org.apache.commons" % "commons-lang3" % "3.3", specs2Test),
crossPaths := false,
sourceGenerators in Compile <+= (baseDirectory in Compile) zip (sourceManaged in Compile) map (dirs {
val (base, managed) = dirs

0 comments on commit bf89ece

Please sign in to comment.