Skip to content

Commit

Permalink
logging of SPARQL request on error #35
Browse files Browse the repository at this point in the history
  • Loading branch information
manonthegithub committed Jan 10, 2024
1 parent 3f2bca6 commit bedf90f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/org/dbpedia/databus/SparqlClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ abstract class JdbcCLient(connectionString: String, user: String, pass: String)
})
.recoverWith {
case err =>
log.error(s"Failed SPARQL request batch:\n${upds.fold("")((l, r) => l + "\n" + r)}")
Try(conn.rollback())
.flatMap(_ => Try(conn.close()))
.flatMap(_ => Failure(err))
Expand Down Expand Up @@ -418,6 +419,7 @@ object RdfConversions {
}

case class Warning(message: String)

private class ErrorHandlerWithWarnings extends ErrorHandler {
private val defaultEH = ErrorHandlerFactory.getDefaultErrorHandler

Expand Down

0 comments on commit bedf90f

Please sign in to comment.