(self)
| 37 | return to_text(_repr) |
| 38 | |
| 39 | def __repr__(self): |
| 40 | _repr = '{klass}({code}, {msg})'.format( |
| 41 | klass=self.__class__.__name__, |
| 42 | code=self.errcode, |
| 43 | msg=self.errmsg |
| 44 | ) |
| 45 | if six.PY2: |
| 46 | return to_binary(_repr) |
| 47 | else: |
| 48 | return to_text(_repr) |
| 49 | |
| 50 | |
| 51 | class WeChatClientException(WeChatException): |