public Exception ConvertException(Exception exp)
        {
            string typeName = "";
            string keyName  = "";

            if (NHExceptionDetector.IsDublicateException(exp, out typeName, out keyName))
            {
                return(new InquiryJobIndexPointDuplicateException("InquiryJobIndexPoint", "JobIndexPoint"));
            }
            if (NHExceptionDetector.IsDeleteHasRelatedDataException(exp, out typeName, out keyName))
            {
                return(new InquiryJobIndexPointDeleteException("InquiryJobIndexPoint", "Id"));
            }
            throw new Exception();
        }
Example #2
0
        public Exception ConvertException(Exception exp)
        {
            string typeName = "";
            string keyName  = "";

            if (NHExceptionDetector.IsDublicateException(exp, out typeName, out keyName))
            {
                return(new ClaimDuplicateException("Claim", ""));
            }
            if (NHExceptionDetector.IsDeleteHasRelatedDataException(exp, out typeName, out keyName))
            {
                return(new ClaimDeleteException("Claim", "Id"));
            }
            throw new Exception();
        }
Example #3
0
        public Exception ConvertException(Exception exp)
        {
            string typeName = "";
            string keyName  = "";

            if (NHExceptionDetector.IsDublicateException(exp, out typeName, out keyName))
            {
                return(new UnitIndexDuplicateException(typeName, keyName));
            }
            if (NHExceptionDetector.IsDeleteHasRelatedDataException(exp, out typeName, out keyName))
            {
                return(new UnitIndexDeleteException(typeName, keyName));
            }
            throw new Exception();
        }
Example #4
0
        public JobIndexException ConvertException(Exception exp)
        {
            string typeName = "";
            string keyName  = "";

            if (NHExceptionDetector.IsDublicateException(exp, out typeName, out keyName))
            {
                return(new JobIndexDuplicateException("JobIndex", "DictionaryName"));
            }
            if (NHExceptionDetector.IsDeleteHasRelatedDataException(exp, out typeName, out keyName))
            {
                return(new JobIndexDeleteException("JobIndex", "Id"));
            }
            throw new Exception();
        }
Example #5
0
        public CustomFieldTypeException ConvertException(Exception exp)
        {
            string typeName = "";
            string keyName  = "";

            if (NHExceptionDetector.IsDublicateException(exp, out typeName, out keyName))
            {
                return(new CustomFieldTypeDuplicateException("CustomFieldType", "DictionaryName"));
            }
            if (NHExceptionDetector.IsDeleteHasRelatedDataException(exp, out typeName, out keyName))
            {
                return(new CustomFieldTypeDeleteException("CustomFieldType", "Id"));
            }
            throw new Exception();
        }