Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

refactor: add more exception info #59

Merged

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Oct 16, 2019

原有的异常信息仅给出错误码,例如ERR_OBJECT_NOT_FOUND,而没有详细的异常信息,这种错误:
1、用户不能明白具体含义
2、不利于问题追踪
该PR在抛异常处重新添加了处理异常的逻辑,细化各个错误码的具体描述,并给出必要的信息,修改过后的异常信息将类似:

ERR_OBJECT_NOT_FOUND: [metaServer=[127.0.0.1:34601, 127.0.0.1:34602, 127.0.0.1:34603],tableName=temps] No such table. Please make sure your meta addresses and table name are correct!!
ERR_TIMEOUT: [table=temp,operation=get,replicaServer=0.0.0.0:0,gPid=(gpid(1.4))] The operationTimeout is 1000ms!

Copy link
Member

@vagetablechicken vagetablechicken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@neverchanje neverchanje merged commit 2f9cac1 into XiaoMi:thrift-0.11.0-inlined Oct 17, 2019
foreverneverer added a commit that referenced this pull request Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants