public bool TryMatch(Exception exception, out ExceptionKnowledgeBaseEntry entry)
        {
            ExceptionKnowledgeBaseEntry knowledgeBaseEntry = _tryMatch(exception);

            if (knowledgeBaseEntry == null)
            {
                entry = null;
                return(false);
            }
            entry = knowledgeBaseEntry;
            return(true);
        }
示例#2
0
        public static bool TryInterpret(Exception exception, out ExceptionKnowledgeBaseEntry entry)
        {
            Exception exception1 = exception.UnpackFromContainers();

            try
            {
                foreach (ExceptionKnowledge exceptionKnowledge in Rules)
                {
                    if (exceptionKnowledge.TryMatch(exception1, out entry))
                    {
                        return(true);
                    }
                }
            }
            catch
            {
            }
            entry = null;
            return(false);
        }