public static string Format(
            string context,
            string problem,
            string solution)
        {
            if (problem == null)
            {
                problem = "The active state is null because the state machine has not been set up yet.";
            }

            if (solution == null)
            {
                solution = "Call fsm.SetStartState(...) and fsm.Init() or fsm.OnEnter() "
                           + "to initialize the state machine.";
            }

            return(ExceptionFormatter.Format(context, problem, solution));
        }
        private static string Format(
            TState stateName,
            string context,
            string problem,
            string solution)
        {
            if (problem == null)
            {
                problem = $"The state \"{stateName}\" has not been defined yet / doesn't exist.";
            }

            if (solution == null)
            {
                solution = "\n"
                           + "1. Check that there are no typos in the state names and transition from and to names\n"
                           + "2. Add this state before calling Init / OnEnter / OnLogic / RequestStateChange / ...";
            }

            return(ExceptionFormatter.Format(context, problem, solution));
        }