Statistics
| Branch: | Revision:

root / txapps / exceptions.py @ 11:47707eb78033

History | View | Annotate | Download (448 Bytes)

1
# -*- coding: utf-8 -*-
2

    
3
"""
4
Exceptions used in TxApps.
5
"""
6

    
7

    
8
class RemoteTxAppError(Exception):
9
    """Exception raised when the remote TxApp returned an error."""
10

    
11
    def __init__(self, status_code, content, *args, **kwargs):
12
        self.status_code = status_code
13
        self.content = content
14

    
15
    def __unicode__(self):
16
        return u"TxApp error: status_code is %s, message is %s" % (
17
            self.status_code, self.content
18
        )