Ejemplo n.º 1
0
        internal virtual void Register(RSException rsException, ObjectType objectType)
        {
            if (m_suspendErrors)
            {
                return;
            }
            m_hasError = true;
            if (m_messages == null)
            {
                m_messages = new ProcessingMessageList();
            }
            ProcessingMessage processingMessage = CreateProcessingMessage(rsException.Code, objectType, rsException.Message);

            m_messages.Add(processingMessage);
            for (rsException = (rsException.InnerException as RSException); rsException != null; rsException = (rsException.InnerException as RSException))
            {
                ProcessingMessage processingMessage2 = CreateProcessingMessage(rsException.Code, objectType, rsException.Message);
                if (processingMessage.ProcessingMessages == null)
                {
                    processingMessage.ProcessingMessages = new ProcessingMessageList(1);
                }
                processingMessage.ProcessingMessages.Add(processingMessage2);
                processingMessage = processingMessage2;
            }
        }
Ejemplo n.º 2
0
 internal override ProcessingMessage Register(ProcessingErrorCode code, Severity severity, ObjectType objectType, string objectName, string propertyName, ProcessingMessageList innerMessages, params string[] arguments)
 {
     try
     {
         Monitor.Enter(this);
         if (severity == Severity.Error)
         {
             m_hasError = true;
         }
         if (RegisterItem(severity, code, objectType, objectName))
         {
             if (m_messages == null)
             {
                 m_messages = new ProcessingMessageList();
             }
             ProcessingMessage processingMessage = ErrorContext.CreateProcessingMessage(code, severity, objectType, objectName, propertyName, innerMessages, arguments);
             m_messages.Add(processingMessage);
             return(processingMessage);
         }
         return(null);
     }
     finally
     {
         Monitor.Exit(this);
     }
 }
Ejemplo n.º 3
0
 private static string CodeFromMessage(ProcessingMessage message)
 {
     if (message.Code == ProcessingErrorCode.rsNone)
     {
         return(message.CommonCode.ToString());
     }
     return(message.Code.ToString());
 }
        private void ResolveAssemblylocations(StringList codeModules, CompilerParameters options, ErrorContext errorContext, AppDomain compilationTempAppDomain)
        {
            AssemblyLocationResolver assemblyLocationResolver = AssemblyLocationResolver.CreateResolver(compilationTempAppDomain);

            for (int num = codeModules.Count - 1; num >= 0; num--)
            {
                try
                {
                    options.ReferencedAssemblies.Add(assemblyLocationResolver.LoadAssemblyAndResolveLocation(codeModules[num]));
                }
                catch (Exception ex)
                {
                    ProcessingMessage processingMessage = errorContext.Register(ProcessingErrorCode.rsErrorLoadingCodeModule, Severity.Error, ObjectType.Report, null, null, codeModules[num], ex.Message);
                    if (Global.Tracer.TraceError && processingMessage != null)
                    {
                        Global.Tracer.Trace(TraceLevel.Error, processingMessage.Message + Environment.NewLine + ex.ToString());
                    }
                }
            }
        }
Ejemplo n.º 5
0
 internal void Combine(ProcessingMessageList messages)
 {
     if (messages == null)
     {
         return;
     }
     for (int i = 0; i < messages.Count; i++)
     {
         ProcessingMessage processingMessage = messages[i];
         if (processingMessage.Severity == Severity.Error)
         {
             m_hasError = true;
         }
         if (RegisterItem(processingMessage.Severity, processingMessage.Code, processingMessage.ObjectType, processingMessage.ObjectName))
         {
             if (m_messages == null)
             {
                 m_messages = new ProcessingMessageList();
             }
             m_messages.Add(processingMessage);
         }
     }
 }