]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/lib/netcore/Thrift/Transports/TTransportException.cs
b7c42e33a87321e004dff3716047edfb835b561f
[ceph.git] / ceph / src / jaegertracing / thrift / lib / netcore / Thrift / Transports / TTransportException.cs
1 // Licensed to the Apache Software Foundation(ASF) under one
2 // or more contributor license agreements.See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership.The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing,
12 // software distributed under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17
18 namespace Thrift.Transports
19 {
20 // ReSharper disable once InconsistentNaming
21 public class TTransportException : TException
22 {
23 public enum ExceptionType
24 {
25 Unknown,
26 NotOpen,
27 AlreadyOpen,
28 TimedOut,
29 EndOfFile,
30 Interrupted
31 }
32
33 protected ExceptionType ExType;
34
35 public TTransportException()
36 {
37 }
38
39 public TTransportException(ExceptionType exType)
40 : this()
41 {
42 ExType = exType;
43 }
44
45 public TTransportException(ExceptionType exType, string message)
46 : base(message)
47 {
48 ExType = exType;
49 }
50
51 public TTransportException(string message)
52 : base(message)
53 {
54 }
55
56 public ExceptionType Type => ExType;
57 }
58 }