Skip to content

Commit

Permalink
more descriptive error message
Browse files Browse the repository at this point in the history
  • Loading branch information
faustin0 committed Nov 15, 2022
1 parent c0af3f3 commit ccfdeef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/jms4s/jms/MessageFactory.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ class MessageFactory[F[_]](private val context: JmsContext[F]) extends AnyVal {
from.getJMSReplyTo.traverse_ {
case queue: Queue => to.setJMSReplyTo(new JmsQueue(queue))
case topic: Topic => to.setJMSReplyTo(new JmsTopic(topic))
case _ => Failure(new RuntimeException("Unsupported destination"))
case d => Failure(new RuntimeException(s"Unsupported destination: $d"))
},
from.getJMSDestination.traverse_ {
case queue: Queue => to.setJMSDestination(new JmsQueue(queue))
case topic: Topic => to.setJMSDestination(new JmsTopic(topic))
case _ => Failure(new RuntimeException("Unsupported destination"))
case d => Failure(new RuntimeException(s"Unsupported destination: $d"))
},
from.getJMSDeliveryMode.traverse_(to.setJMSDeliveryMode),
from.getJMSRedelivered.traverse_(to.setJMSRedelivered),
Expand Down

0 comments on commit ccfdeef

Please sign in to comment.