Package proton :: Module _exceptions
[frames] | no frames]

Source Code for Module proton._exceptions

 1  # 
 2  # Licensed to the Apache Software Foundation (ASF) under one 
 3  # or more contributor license agreements.  See the NOTICE file 
 4  # distributed with this work for additional information 
 5  # regarding copyright ownership.  The ASF licenses this file 
 6  # to you under the Apache License, Version 2.0 (the 
 7  # "License"); you may not use this file except in compliance 
 8  # with the License.  You may obtain a copy of the License at 
 9  # 
10  #   http://www.apache.org/licenses/LICENSE-2.0 
11  # 
12  # Unless required by applicable law or agreed to in writing, 
13  # software distributed under the License is distributed on an 
14  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
15  # KIND, either express or implied.  See the License for the 
16  # specific language governing permissions and limitations 
17  # under the License. 
18  # 
19   
20  from __future__ import absolute_import 
21   
22  from cproton import PN_TIMEOUT, PN_INTR 
23   
24   
25 -class ProtonException(Exception):
26 """ 27 The root of the proton exception hierarchy. All proton exception 28 classes derive from this exception. 29 """ 30 pass
31 32
33 -class Timeout(ProtonException):
34 """ 35 A timeout exception indicates that a blocking operation has timed 36 out. 37 """ 38 pass
39 40
41 -class Interrupt(ProtonException):
42 """ 43 An interrupt exception indicates that a blocking operation was interrupted. 44 """ 45 pass
46 47 48 EXCEPTIONS = { 49 PN_TIMEOUT: Timeout, 50 PN_INTR: Interrupt 51 } 52 53
54 -class MessageException(ProtonException):
55 """ 56 The MessageException class is the root of the message exception 57 hierarchy. All exceptions generated by the Message class derive from 58 this exception. 59 """ 60 pass
61 62
63 -class DataException(ProtonException):
64 """ 65 The DataException class is the root of the Data exception hierarchy. 66 All exceptions raised by the Data class extend this exception. 67 """ 68 pass
69 70
71 -class TransportException(ProtonException):
72 pass
73 74
75 -class SSLException(TransportException):
76 pass
77 78
79 -class SSLUnavailable(SSLException):
80 pass
81 82
83 -class ConnectionException(ProtonException):
84 pass
85 86
87 -class SessionException(ProtonException):
88 pass
89 90
91 -class LinkException(ProtonException):
92 pass
93