diff --git a/src/Adaptive.Cluster/Service/ClusteredServiceAgent.cs b/src/Adaptive.Cluster/Service/ClusteredServiceAgent.cs index 2bafa2d..835c2e8 100644 --- a/src/Adaptive.Cluster/Service/ClusteredServiceAgent.cs +++ b/src/Adaptive.Cluster/Service/ClusteredServiceAgent.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Runtime.ExceptionServices; using System.Threading; using Adaptive.Aeron; using Adaptive.Aeron.Exceptions; @@ -979,7 +980,7 @@ private void ExecuteAction(ClusterAction action, long logPosition, long leadersh if (null != exception) { - throw exception; + ExceptionDispatchInfo.Capture(exception).Throw(); } } }