Mono.Addins.AddinEngine.ReportError C# (CSharp) Метод

ReportError() приватный Метод

private ReportError ( string message, string addinId, Exception exception, bool fatal ) : void
message string
addinId string
exception System.Exception
fatal bool
Результат void
        internal void ReportError(string message, string addinId, Exception exception, bool fatal)
        {
            var handler = AddinLoadError;
            if (handler != null)
                handler (null, new AddinErrorEventArgs (message, addinId, exception));
            else {
                Console.WriteLine (message);
                if (exception != null)
                    Console.WriteLine (exception);
            }
        }

Usage Example

Пример #1
0
        Array GetChildObjectsInternal(Type arrayElementType, bool reuseCachedInstance)
        {
            ArrayList list = new ArrayList(ChildNodes.Count);

            for (int n = 0; n < ChildNodes.Count; n++)
            {
                InstanceExtensionNode node = ChildNodes [n] as InstanceExtensionNode;
                if (node == null)
                {
                    addinEngine.ReportError("Error while getting object for node in path '" + Path + "'. Extension node is not a subclass of InstanceExtensionNode.", null, null, false);
                    continue;
                }

                try {
                    if (reuseCachedInstance)
                    {
                        list.Add(node.GetInstance(arrayElementType));
                    }
                    else
                    {
                        list.Add(node.CreateInstance(arrayElementType));
                    }
                }
                catch (Exception ex) {
                    addinEngine.ReportError("Error while getting object for node in path '" + Path + "'.", node.AddinId, ex, false);
                }
            }
            return(list.ToArray(arrayElementType));
        }
All Usage Examples Of Mono.Addins.AddinEngine::ReportError