messense commented on a change in pull request #72: style(client) polish code
style
URL:
https://github.com/apache/rocketmq-client-python/pull/72#discussion_r343994101
##########
File path: rocketmq/exceptions.py
##########
@@ -38,9 +38,9 @@ def ffi_check(status_code):
msg = dll.GetLatestErrorMessage()
if msg is not None:
msg = msg.decode('utf-8')
- msg = re.sub('<.*?(rocketmq-client-cpp/)(.*)>', '\\1\\2', msg)
- if msg.startswith('msg: '):
- msg = msg[5:]
+ # msg = re.sub('<.*?(rocketmq-client-cpp/)(.*)>', '\\1\\2', msg)
Review comment:
This makes error message more friendly, I'd say the error message produced
by rocketmq-client-cpp is kind of weird
1. No need to prefix error message with `msg: `
2. Avoid absolute file path because it usually does not match user's file
path.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services