Return code Specification
Preferably in a system, or even a team, a company that follows a set of return status code rules and plans ahead, such as:
0001 ~ 1999, 2000 ~ 2999,4000 ~ 4999
These code segments can be as follows: Business type, according to the type of work, according to the architectural level ahead of planning, such as X~y is the network segment, which section for the error code, which is used for the success code, feel this from the architectural level of the relatively clear, all of a sudden know whether success or failure, And then according to the number of other bits can also identify the business layer above the characteristics, feel that these plans together have the best effect, give the code segment. So the overall plan can be unified.
ABCD four-bit
A:?
B:?
C:?
D:?
More mature systems, for example, some software, the site in various situations, or a variety of errors will have a return status code, I know that the status code of each business has, a system of business so much, there must be a good return code design specifications.
I would like to ask you general how to design this standard, according to what standards, where can find reference information?
(I remember where I've seen the design standard of the interface return code of the American group Takeout, now forget to find it)
Reply content:
Return code Specification
Preferably in a system, or even a team, a company that follows a set of return status code rules and plans ahead, such as:
0001 ~ 1999, 2000 ~ 2999,4000 ~ 4999
These code segments can be as follows: Business type, according to the type of work, according to the architectural level ahead of planning, such as X~y is the network segment, which section for the error code, which is used for the success code, feel this from the architectural level of the relatively clear, all of a sudden know whether success or failure, And then according to the number of other bits can also identify the business layer above the characteristics, feel that these plans together have the best effect, give the code segment. So the overall plan can be unified.
ABCD four-bit
A:?
B:?
C:?
D:?
More mature systems, for example, some software, the site in various situations, or a variety of errors will have a return status code, I know that the status code of each business has, a system of business so much, there must be a good return code design specifications.
I would like to ask you general how to design this standard, according to what standards, where can find reference information?
(I remember where I've seen the design standard of the interface return code of the American group Takeout, now forget to find it)