Akka.Actor.ActorCell.FaultResume C# (CSharp) Method

FaultResume() private method

Resumes the actor in response to a failure
private FaultResume ( Exception causedByFailure ) : void
causedByFailure System.Exception The exception that caused the failure. signifies if it was our own failure /// which prompted this action.
return void
        private void FaultResume(Exception causedByFailure)
        {
            if (_actor == null)
            {
                _systemImpl.EventStream.Publish(new Error(null, _self.Path.ToString(), GetType(), "Changing Resume into Create after " + causedByFailure));
                FaultCreate();
            }
            //Akka Jvm does the following commented section as well, but we do not store the context inside the actor so it's not applicable
            //    else if (_actor.context == null && causedByFailure != null)
            //    {
            //        system.eventStream.publish(Error(self.path.toString, clazz(actor), "changing Resume into Restart after " + causedByFailure))
            //        faultRecreate(causedByFailure)
            //    }
            else
            {
                var perp = Perpetrator;
                // done always to keep that suspend counter balanced
                // must happen "atomically"
                try
                {
                    ResumeNonRecursive();
                }
                finally
                {
                    if (causedByFailure != null)
                        ClearFailed();
                }
                ResumeChildren(causedByFailure, perp);
            }
        }