Beispiel #1
0
        public static ThriftyTransportException.ExceptionType ToThriftyError(this TTransportException.ExceptionType thriftType)
        {
            switch (thriftType)
            {
            case TTransportException.ExceptionType.AlreadyOpen:
                return(ThriftyTransportException.ExceptionType.AlreadyOpen);

            case TTransportException.ExceptionType.EndOfFile:
                return(ThriftyTransportException.ExceptionType.EndOfFile);

            case TTransportException.ExceptionType.Interrupted:
                return(ThriftyTransportException.ExceptionType.Interrupted);

            case TTransportException.ExceptionType.NotOpen:
                return(ThriftyTransportException.ExceptionType.NotOpen);

            case TTransportException.ExceptionType.TimedOut:
                return(ThriftyTransportException.ExceptionType.TimedOut);

            case TTransportException.ExceptionType.Unknown:
            default:
                return(ThriftyTransportException.ExceptionType.Unknown);
            }
        }
Beispiel #2
0
 public TTransportException(TTransportException.ExceptionType type, string message) : base(message)
 {
     this.type = type;
 }
Beispiel #3
0
 public TTransportException(TTransportException.ExceptionType type) : this()
 {
     this.type = type;
 }