Include cause in io.CommandFailed?
Question/request by Horst Dehmer (can't find it in the archives):
I'm playing with akka-io (2.2.3).
I'm a little confused about the CommandFailed message, which obviously doesn't contain an optional cause (read Throwable), why a certain command failed. With UDP, for example, a Bind() command can fail for a number of reasons: (BindException: Address already in use, SocketException: Permission denied, ...) akka.io.UdpListener:51 just logs the exception and issues a CommandFailed().
Why is it that the underlying cause is not forwarded to caller (in my case some Bootstrap actor)? Is that an oversight in the design, or do I misunderstand something?
How am I supposed to report the underlying cause to a end user?
I probably could clone and shadow the original UdpListener and roll my own CommandFailed(), but that seems rather strange. What could be wrong with something like CommandFailed(Command, Option[Throwable])?
I'd appreciate some clarification on this topic.
I'm playing with akka-io (2.2.3).
I'm a little confused about the CommandFailed message, which obviously doesn't contain an optional cause (read Throwable), why a certain command failed. With UDP, for example, a Bind() command can fail for a number of reasons: (BindException: Address already in use, SocketException: Permission denied, ...) akka.io.UdpListener:51 just logs the exception and issues a CommandFailed().
Why is it that the underlying cause is not forwarded to caller (in my case some Bootstrap actor)? Is that an oversight in the design, or do I misunderstand something?
How am I supposed to report the underlying cause to a end user?
I probably could clone and shadow the original UdpListener and roll my own CommandFailed(), but that seems rather strange. What could be wrong with something like CommandFailed(Command, Option[Throwable])?
I'd appreciate some clarification on this topic.
Leave a comment