Skip to content

Commit

Permalink
Set exception on CamelExchange if message conversion fails
Browse files Browse the repository at this point in the history
- re #37
  • Loading branch information
krasserm committed Jun 18, 2017
1 parent 5ae4d75 commit 6c5a869
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ package object dsl {
context.consumerTemplate.doneUoW(ce)
case Success(ce) =>
Try(StreamMessage.from[A](ce.getIn)) match {
case Success(m) => callback(Right(m))
case Failure(e) => callback(Left(e))
case Success(m) =>
callback(Right(m))
case Failure(e) =>
callback(Left(e))
ce.setException(e)
}
context.consumerTemplate.doneUoW(ce)
case Failure(ex) =>
Expand Down

0 comments on commit 6c5a869

Please sign in to comment.