diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-02-18 20:22:23 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-02-18 20:22:23 +0000 |
commit | 6577298076dbacbcc2d3280057b9129282ebf162 (patch) | |
tree | bf5d370f4876e14a9e257cc56d04fb5511614a10 /python/qpid/messaging/exceptions.py | |
parent | 98ed72a36159ab9084ecf49045456dd21d5a64f8 (diff) | |
download | qpid-python-6577298076dbacbcc2d3280057b9129282ebf162.tar.gz |
split messaging.py into multiple files and made qpid.messaging a package
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@911550 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/exceptions.py')
-rw-r--r-- | python/qpid/messaging/exceptions.py | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/python/qpid/messaging/exceptions.py b/python/qpid/messaging/exceptions.py new file mode 100644 index 0000000000..5c8bdedc26 --- /dev/null +++ b/python/qpid/messaging/exceptions.py @@ -0,0 +1,67 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +class ConnectionError(Exception): + """ + The base class for all connection related exceptions. + """ + pass + +class ConnectError(ConnectionError): + """ + Exception raised when there is an error connecting to the remote + peer. + """ + pass + +class SessionError(Exception): + pass + +class Disconnected(SessionError): + """ + Exception raised when an operation is attempted that is illegal when + disconnected. + """ + pass + +class NontransactionalSession(SessionError): + """ + Exception raised when commit or rollback is attempted on a non + transactional session. + """ + pass + +class TransactionAborted(SessionError): + pass + +class SendError(SessionError): + pass + +class InsufficientCapacity(SendError): + pass + +class ReceiveError(SessionError): + pass + +class Empty(ReceiveError): + """ + Exception raised by L{Receiver.fetch} when there is no message + available within the alloted time. + """ + pass |