static void ParallelTick(Token token) { try { if (!string.IsNullOrEmpty(token.Text)) { var generator = GeneratorFactory.NewGenerator(token.GeneratorType); using (var reader = new StringReader(token.Text)) { if (generator.Load(reader, token, NullEnvironment.Instance)) { generator.Write(TextWriter.Null); } } } } #pragma warning disable CA1031 // Do not catch general exception types catch (Exception) { token.AddError(1, 1, 1, 1, "KA-BOOM!!!"); } #pragma warning restore CA1031 // Do not catch general exception types }