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 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
}
{
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;
}
{
}
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;
}