def __init__(self, reason, status_code=None, content=None):
        """Exception for target service error."""
        Exception.__init__(self)
        if not isinstance(reason, str):
            raise TypeError("'reason' must be a str")
        self.reason = reason
        if status_code is not None:
            if isinstance(status_code, int):
                self.status_code = status_code
            else:
                raise TypeError("'status_code' must be an int")
        if content is not None:
            if not isinstance(content, basestring):
                raise TypeError("'content' must be a basestring")
        self.content = content
def __init__ ( self , reason , status_code = None , content = None ) : Exception . __init__ ( self ) if not isinstance ( reason , str ) : raise TypeError ( "'reason' must be a str" ) self . reason = reason if status_code is not None : if isinstance ( status_code , int ) : self . status_code = status_code else : raise TypeError ( "'status_code' must be an int" ) if content is not None : if not isinstance ( content , basestring ) : raise TypeError ( "'content' must be a basestring" ) self . content = content
Exception for target service error.