Skip to content

Commit

Permalink
Keep failure cause
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru committed Jan 11, 2021
1 parent aadbcd5 commit 3da418b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ trait BaseByteArrayJournalDao
val write = PersistentRepr(payload, sequenceNr, persistenceId)
val serializedRow = serializer.serialize(write) match {
case Success(t) => t
case Failure(_) =>
case Failure(cause) =>
throw new IllegalArgumentException(
s"Failed to serialize ${write.getClass} for update of [$persistenceId] @ [$sequenceNr]")
s"Failed to serialize ${write.getClass} for update of [$persistenceId] @ [$sequenceNr]", cause)
}
db.run(queries.update(persistenceId, sequenceNr, serializedRow.message).map(_ => Done))
}
Expand Down

0 comments on commit 3da418b

Please sign in to comment.