public class BizException : Exception
    {
        public BizException()
        {
        }

        public BizException(BizExceptionType o)
        {
            Utility.GeneralLog(o.ToString());
            myType = o;
        }

        private BizExceptionType myType = BizExceptionType.DefaultException;

        public BizExceptionType MyType
        {
            get { return myType; }
            set { myType = value; }
        }
    } 

 

public enum BizExceptionType
    {
        DefaultException, //default
}


throw new BizException(BizExceptionType.DefaultException);

 

            try
            {

            }
            catch (BizException ex)
            {
                log.Error(ex.MyType.ToString());
                throw new SoapException(ex.MyType.ToString(), new System.Xml.XmlQualifiedName(ex.MyType.ToString()));
            }
            catch (Exception ex)
            {
                log.Error(ex.ToString());
                throw ex;
            }

相关文章:

  • 2021-10-13
  • 2022-01-12
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2021-07-20
  • 2021-06-19
  • 2021-10-02
  • 2021-12-26
相关资源
相似解决方案