Boo.Lang.Compiler.CompilerErrorFactory.StepExecutionError C# (CSharp) Метод

StepExecutionError() публичный статический Метод

public static StepExecutionError ( Exception error, ICompilerStep step ) : CompilerError
error Exception
step ICompilerStep
Результат CompilerError
        public static CompilerError StepExecutionError(Exception error, ICompilerStep step)
        {
            return Instantiate("BCE0011", error, step, error.Message);
        }

Usage Example

Пример #1
0
        protected void RunStep(CompilerContext context, ICompilerStep step)
        {
            CurrentStep = step;
            try
            {
                OnBeforeStep(context, step);

                step.Initialize(context);
                try
                {
                    step.Run();
                }
                catch (Boo.Lang.Compiler.CompilerError error)
                {
                    context.Errors.Add(error);
                }
                catch (System.Exception x)
                {
                    context.Errors.Add(CompilerErrorFactory.StepExecutionError(x, step));
                }
                finally
                {
                    OnAfterStep(context, step);
                }
            }
            finally
            {
                CurrentStep = null;
            }
        }
CompilerErrorFactory