There are some situations in that exceptions might be raised inside the SetState method.
For example,
var str = JsonSerializer.Serialize(new CrashedState{Type = typeof(decimal)});
public class CrashedState
{
public Type Type { get; set; }
}
So, Add Try catch and write some logs are useful here so that we can easily figure out the root cause. Originally, any exceptions raised inside are dismissed due to feature.StateChanged += Feature_StateChanged;
There are some situations in that exceptions might be raised inside the
SetState
method.For example,
So, Add Try catch and write some logs are useful here so that we can easily figure out the root cause. Originally, any exceptions raised inside are dismissed due to
feature.StateChanged += Feature_StateChanged;