| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using System.Runtime.Serialization;
- namespace Top.Api
- {
- /// <summary>
- /// TOP客户端异常。
- /// </summary>
- public class TopException : Exception
- {
- private string errorCode;
- private string errorMsg;
- private string subErrorCode;
- private string subErrorMsg;
- public TopException()
- : base()
- {
- }
- public TopException(string message)
- : base(message)
- {
- }
- protected TopException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- public TopException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
- public TopException(string errorCode, string errorMsg)
- : base(errorCode + ":" + errorMsg)
- {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- }
- public TopException(string errorCode, string errorMsg, string subErrorCode, string subErrorMsg)
- : base(errorCode + ":" + errorMsg + ":" + subErrorCode + ":" + subErrorMsg)
- {
- this.errorCode = errorCode;
- this.errorMsg = errorMsg;
- this.subErrorCode = subErrorCode;
- this.subErrorMsg = subErrorMsg;
- }
- public string ErrorCode
- {
- get { return this.errorCode; }
- }
- public string ErrorMsg
- {
- get { return this.errorMsg; }
- }
- public string SubErrorCode
- {
- get { return this.subErrorCode; }
- }
- public string SubErrorMsg
- {
- get { return this.subErrorMsg; }
- }
- }
- }
|