Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serialization verification problem with Akka.IO messages #4974

Prev Previous commit
Next Next commit
Expand exception message with their actor types
  • Loading branch information
Arkatufus committed Apr 22, 2021
commit bbcb13271518ed5b4256b5202162aaeb4f57def2
2 changes: 1 addition & 1 deletion src/core/Akka/Actor/ActorCell.Children.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ private IInternalActorRef MakeChild(Props props, string name, bool async, bool s
catch (Exception e)
{
throw new SerializationException(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catch and re-throw to add a more meaningful exception message to the error

$"Failed to serialize and deserialize actor props argument of type {propArgument?.GetType()}",
$"Failed to serialize and deserialize actor props argument of type {propArgument?.GetType()} for actor type [{props.Type}].",
e);
}
finally
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka/Actor/ActorCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ private Envelope SerializeAndDeserialize(Envelope envelope)
}
catch (Exception e)
{
throw new SerializationException($"Failed to serialize and deserialize payload object [{unwrapped.GetType()}]. Envelope: [{envelope}]", e);
throw new SerializationException($"Failed to serialize and deserialize payload object [{unwrapped.GetType()}]. Envelope: [{envelope}], Actor type: [{Actor.GetType()}]", e);
}

if (deadLetter != null)
Expand Down