Beispiel #1
0
 public virtual void AddTemplateVariablesManagerErrorsToRetVal(ref TemplateOutput retVal, Enums.LogLevel logLevel)
 {
     foreach (var errorItem in TemplateVariablesManager.Errors)
     {
         retVal.Errors.Add(new TemplateError()
         {
             ErrorLevel       = logLevel,
             Message          = errorItem,
             TemplateIdentity = ProcessModel.TemplateIdentity.Copy()
         });
     }
 }
Beispiel #2
0
        public virtual void AddError(ref TemplateOutput templateOutput, Exception ex, Enums.LogLevel logLevel)
        {
            while (ex != null)
            {
                TemplateError te = new TemplateError()
                {
                    ErrorLevel       = logLevel,
                    Message          = ex.Message,
                    StackTrace       = ex.StackTrace,
                    TemplateIdentity = ProcessModel.TemplateIdentity.Copy()
                };

                templateOutput.Errors.Add(te);
                ex = ex.InnerException;
            }
        }