Mono.Cecil.Tests.Formatter.WriteExceptionHandlers C# (CSharp) Method

WriteExceptionHandlers() static private method

static private WriteExceptionHandlers ( TextWriter writer, MethodBody body ) : void
writer System.IO.TextWriter
body Mono.Cecil.Cil.MethodBody
return void
        static void WriteExceptionHandlers(TextWriter writer, MethodBody body)
        {
            if (!body.HasExceptionHandlers)
                return;

            foreach (var handler in body.ExceptionHandlers) {
                writer.Write ("\t");
                writer.WriteLine (".try {0} to {1} {2} handler {3} to {4}",
                    FormatLabel (handler.TryStart),
                    FormatLabel (handler.TryEnd),
                    FormatHandlerType (handler),
                    FormatLabel (handler.HandlerStart),
                    FormatLabel (handler.HandlerEnd));
            }
        }