private void Behavior() { var on_lost = Handle <LostLetter>(); on_lost += letter => { if (!System.Config.LogLostLetters) { return; } ActorLog.Info( $"Message from \"{letter.Sender.Path.Path}\" containing " + $"{letter.Data.GetType().Name} did not reach target " + $"at \"{letter.Receiver.Path}\". " + "Data: {0}", new object[] { letter.Data } ); }; var on_any = AnyHandler(); on_any += msg => { ActorLog.Warning( $"{nameof(LostLetters)} got a message that was not of {nameof(LostLetter)}!" ); }; }
internal override void InformParentOfError(Exception e) { if (Children.Count == 0) { ActorLog.Warning("Tried to inform root supervisor of an error when it has no children to error"); return; } var child_ref = Children[0]; var fault = new Fault(System, Self.Path, child_ref, e); Self.Tell(fault, child_ref); }