CN101980176A - Software error code transferring method, device and system - Google Patents
Software error code transferring method, device and system Download PDFInfo
- Publication number
- CN101980176A CN101980176A CN 201010528930 CN201010528930A CN101980176A CN 101980176 A CN101980176 A CN 101980176A CN 201010528930 CN201010528930 CN 201010528930 CN 201010528930 A CN201010528930 A CN 201010528930A CN 101980176 A CN101980176 A CN 101980176A
- Authority
- CN
- China
- Prior art keywords
- error code
- sign indicating
- indicating number
- module
- error
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention provides a software error code transferring method. The method comprises the following steps of: receiving an error code A transmitted from a lower module, wherein the error code A is generated when the lower module has a fault branch; synthesizing a self-generated error code B and the received error code A into an error code AB; and transferring the error code AB to an upper module. In addition, the embodiment of the invention also provides a corresponding software error code transferring device and a corresponding software error code transferring system. By using the software error code transferring method, the software error code transferring device and the software error code transferring system disclosed by the embodiment of the invention, the error code carries fault branch information of each layer of the module in a transferring process, in such a way, a transferring path of the error code can be determined according to the error code, so that a fault error reason is positioned accurately and the maintainability is improved.
Description
Technical field
The embodiment of the invention relates to the communication technology, relates in particular to a kind of transmission method, Apparatus and system of software error sign indicating number.
Background technology
In software design, usually all can design module or design function return error code, according to error code judge, positioning fault of software branch flow process.
At present, the mentality of designing of error code has two classes usually: continuous transfer mode of error code and error code indirect transfer mode.Specifically, the continuous transfer mode of error code refers to not change original error code and the continuous mode of transmitting.As shown in Figure 1, Fig. 1 is the method flow diagram of the continuous transfer mode of error code in the prior art.According to Fig. 1, the bottom modules A passes to last layer module B with error code errA, and error code errA passes to top-level module successively like this, and top-level module returns error code and gives external interface.The advantage of the continuous transfer mode of error code is that external interface can be known the most original error code, and its deficiency is the bang path that external interface can't be learnt error code, and because an errA class type of error normally, so the accurate fault location of external interface.The mode of error code indirect transfer mode can be with reference to figure 2, and Fig. 2 is the method flow diagram of error code indirect transfer mode in the prior art.According to Fig. 2, error code is by indirect transfer, and external interface can be known the fault branch of top-level module N.But because the error code indirect transfer, external interface is not known the error code of other module except that top-level module, and does not know the bang path of error code, and external interface is fault location equally accurately.
Summary of the invention
The embodiment of the invention provides a kind of transmission method and device of software error sign indicating number, can determine the bang path of error code, so that accurate localization bug reason improves maintainable.
The transmission method of a kind of software error sign indicating number that the embodiment of the invention provides comprises:
Receive the error code A that lower module is sent, error code A generates when lower floor's module has fault branch;
Error code B that self is generated and received error code A resultant fault sign indicating number AB, AB passes to upper layer module with error code.
The transfer device of a kind of software error sign indicating number that the embodiment of the invention provides, described device comprises:
Receiving element is used to receive the error code A that lower module is sent, and error code A generates when lower floor's module has fault branch;
Synthesis unit is used for the error code B that will self generate and received error code A resultant fault sign indicating number AB;
Transmitting element is used for described error code AB is passed to upper layer module.
The transmission system of a kind of software error sign indicating number that the embodiment of the invention provides comprises:
First module is used for generation error sign indicating number A and sends; Described generation error sign indicating number A generates when first module has fault branch;
Second module is used to receive described error code A, and with the error code B and the described error code A resultant fault sign indicating number AB that self generate, and send, described second module is the upper layer module of first module.
Transmission method, device and the system of the software error sign indicating number that proposes by the embodiment of the invention, error code carries the fault branch information of each layer module in the process of transmitting, like this, just can determine the bang path of error code according to error code, so that accurate localization bug reason improves maintainable.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow diagram of the continuous transfer mode of error code in the prior art;
Fig. 2 is the method flow diagram of error code indirect transfer mode in the prior art;
Fig. 3 is the transmission method process flow diagram of the software error sign indicating number that provides of the embodiment of the invention;
Fig. 4 is the transfer device synoptic diagram of the software error sign indicating number that provides of the embodiment of the invention;
Fig. 5 is the transmission system synoptic diagram of the software error sign indicating number that provides of the embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The present inventor is through discovering that for 32 operating system, the function error code is 32bit, can make full use of error code like this and carry more information.For example, if write down each fault error code with 8bit, 32bit can write down 4 fault error codes so, if analogize the error code that writes down each layer with 4bit, 32bit can write down 8 fault error codes so, based on this idea, is unit design mistake sign indicating number with the function, inherit the error code of last layer during function call, multistage error code is synthesized together.
Embodiment one:
The embodiment of the invention provides a kind of transmission method of software error sign indicating number, and referring to Fig. 3, Fig. 3 is the transmission method process flow diagram of the software error sign indicating number that provides of the embodiment of the invention; This method comprises:
302: receive the error code A that lower module is sent, error code A generates when lower floor's module has fault branch;
304: error code B that self is generated and received error code A resultant fault sign indicating number AB, AB passes to upper layer module with error code;
How specific implementation the present invention of resultant fault sign indicating number AB does not do qualification.
Example one writes down each fault error code with 4bit, when receiving the error code A that lower module is sent, error code A is moved to left 4, and the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB; Making up error code specifically can be achieved as follows:
#define?BUILD_ERR_NUM(ulErrNoAdd,ulErrNoOld)\
((ulErrNoOld<<4)|(ulErrNoAdd?&?0Xf))
Example two writes down each fault error code with 4bit, the every layer of error code that can only remember 15 types at most, and available following method can expand to the error code of 255 types.If error code is still used the 4bit record less than 15 types, if error code greater than 15 types then use the 12bit record, wherein high 4bit is 0, low 8bit is an error code.
Making up error code specifically can be achieved as follows:
#define?BUILD_ERR_NUM(ulErrNoAdd,ulErrNoOld)\
((ulErrNoOld<<16)?((ulErrNoOld<<4)|ulErrNoAdd)\
:((ulErrNoOld<<12)|(ulErrNoAss<<4)))
Like this, when the error code B that self generates greater than 15 types, then error code A is moved to left 12, error code B is placed on minimum 12, in promptly minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
Correspondingly, error code C that upper layer module generates self and received error code AB resultant fault sign indicating number ABC pass to more upper layer module with error code ABC;
The rest may be inferred, and error code N that top-level module N generates self and received ABC... resultant fault sign indicating number ABC...N pass to external interface.
When external interface carried out the error code parsing, the error code of lowest order was the top layer error code; For example:
Describe in conjunction with example one, operating system for 32, if write down the error code of each layer with 4bit, 32bit can write down 8 fault error codes so, like this when error code is 0,001 0,010 00,110,100 0,101 0,110 0,111 1000, then 1000 are top layer error code, and 0001 is bottom error code.
Describe in conjunction with example two, operating system for 32, when error code is 0,001 0,000 10,111,100 0,000 1,101 1,110 1111,1111 are top layer error code, 0001 is the bottom error code, for the type of error code during greater than 15, error code 12bit record then, high specifically 4bit is 0, low 8bit is an error code, that is to say that 0,000 1,011 1100 and 0,000 1,101 1111 is respectively middle two layers error code, like this, though the method for example two has only write down 4 fault error codes, the number of the error code type that every fault error code can write down can reach 255, and, can guarantee that like this error code of top layer and adjacent top layer can be obtained because top layer error code is positioned at lowest order.
As seen, the transmission method of the software error sign indicating number that provides by the embodiment of the invention, error code carry the fault branch information of each layer module in the process of transmitting, like this, just can determine the bang path of error code according to error code, so that accurate localization bug reason improves maintainable.
Embodiment two:
The embodiment of the invention also provides a kind of transfer device of software error sign indicating number, and referring to Fig. 4, Fig. 4 is the transfer device synoptic diagram of the software error sign indicating number that provides of the embodiment of the invention, and this device comprises:
Receiving element 402: be used to receive the error code A that lower module is sent, error code A generates when lower floor's module has fault branch;
Synthesis unit 404: be used for the error code B that will self generate and received error code A resultant fault sign indicating number AB;
Transmitting element 406 is used for described error code AB is passed to upper layer module;
How specific implementation the present invention of resultant fault sign indicating number AB does not do qualification.
Example one writes down each fault error code with 4bit, and like this, synthesis unit specifically comprises: received error code A is moved to left 4, the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB;
Example two writes down each fault error code with 4bit, the every layer of error code that can only remember 15 types at most, and available following method can expand to the error code of 255 types.If error code is still used the 4bit record less than 15 types, if error code greater than 15 types then use the 12bit record, wherein high 4bit is 0, low 8bit is an error code.
Like this, synthesis unit specifically comprises: when the error code B that self generates greater than 15 types, error code A is moved to left 12, error code B is placed on minimum 12, in wherein minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
As seen, the transfer device of the software error sign indicating number that provides by the embodiment of the invention, error code carry the fault branch information of each layer module in the process of transmitting, like this, just can determine the bang path of error code according to error code, so that accurate localization bug reason improves maintainable.
Embodiment three:
The embodiment of the invention also provides a kind of transmission system of software error sign indicating number, and referring to Fig. 5, Fig. 5 is the transmission system synoptic diagram of the software error sign indicating number that provides of the embodiment of the invention, and this system comprises:
First module 502: be used for generation error sign indicating number A and send; Described generation error sign indicating number A generates when first module has fault branch;
Second module 504 is used to receive described error code A, and with the error code B and the described error code A resultant fault sign indicating number AB that self generate, and send, described second module is the upper layer module of first module;
When specific implementation of the present invention, described second module specifically comprises:
Receiving element is used to receive the error code A that first module is sent;
Synthesis unit is used for the error code B that will self generate and received error code A resultant fault sign indicating number AB;
Transmitting element is used for described error code AB is sent.
How specific implementation the present invention of resultant fault sign indicating number AB does not do qualification.
Example one writes down each fault error code with 4bit, and like this, synthesis unit specifically comprises: received error code A is moved to left 4, the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB;
Example two writes down each fault error code with 4bit, the every layer of error code that can only remember 15 types at most, and available following method can expand to the error code of 255 types.If error code is still used the 4bit record less than 15 types, if error code greater than 15 types then use the 12bit record, wherein high 4bit is 0, low 8bit is an error code.
Like this, synthesis unit specifically comprises: when the error code B that self generates greater than 15 types, error code A is moved to left 12, error code B is placed on minimum 12, in wherein minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
Correspondingly, described system also comprises three module, is used to receive described error code AB, and with the error code C and the described error code AB resultant fault sign indicating number ABC that self generate, and send, described three module is the upper layer module of second module;
And the like, described system is further top-level module also, is used for the error code N that will self generate and received ABC... resultant fault sign indicating number ABC...N and passes to external interface, and described ABC... refers to the error code that the adjacent lower module of described top-level module generates.
As seen, the transmission system of the software error sign indicating number that provides by the embodiment of the invention, error code carries the fault branch information of each layer module in the process of transmitting, like this, just can determine the bang path of error code according to error code, so that accurate localization bug reason improves maintainable.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforementioned program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (10)
1. the transmission method of a software error sign indicating number is characterized in that, comprising:
Receive the error code A that lower module is sent, error code A generates when lower floor's module has fault branch;
Error code B that self is generated and received error code A resultant fault sign indicating number AB, AB passes to upper layer module with error code.
2. method according to claim 1, it is characterized in that, described error code B that self is generated and received error code A resultant fault sign indicating number AB specifically comprise: error code A is moved to left 4, the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB.
3. method according to claim 1, it is characterized in that, described error code B that self is generated and received error code A resultant fault sign indicating number AB specifically comprise: when the error code B that self generates greater than 15 types, error code A is moved to left 12, error code B is placed on minimum 12, and wherein in minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
4. the transfer device of a software error sign indicating number is characterized in that, described device comprises:
Receiving element (402) is used to receive the error code A that lower module is sent, and error code A generates when lower floor's module has fault branch;
Synthesis unit (404) is used for the error code B that will self generate and received error code A resultant fault sign indicating number AB;
Transmitting element (406) is used for described error code AB is passed to upper layer module.
5. device according to claim 4 is characterized in that, described synthesis unit specifically comprises: received error code A is moved to left 4, the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB.
6. device according to claim 4, it is characterized in that, described synthesis unit specifically comprises: when the error code B that self generates greater than 15 types, error code A is moved to left 12, error code B is placed on minimum 12, and in wherein minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
7. the transmission system of a software error sign indicating number is characterized in that, comprising:
First module (502) is used for generation error sign indicating number A and sends; Described generation error sign indicating number A generates when first module has fault branch;
Second module (504) is used to receive described error code A, and with the error code B and the described error code A resultant fault sign indicating number AB that self generate, and send, described second module is the upper layer module of first module.
8. system according to claim 7 is characterized in that, described second module specifically comprises:
Receiving element is used to receive the error code A that first module is sent;
Synthesis unit is used for the error code B that will self generate and received error code A resultant fault sign indicating number AB;
Transmitting element is used for described error code AB is sent.
9. system according to claim 8 is characterized in that, described synthesis unit specifically comprises: received error code A is moved to left 4, the error code B that self generates is placed on minimum 4, resultant fault sign indicating number AB.
10. system according to claim 8, it is characterized in that, described synthesis unit specifically comprises: when the error code B that self generates greater than 15 types, error code A is moved to left 12, error code B is placed on minimum 12, and in wherein minimum 12, high 4bit is 0, low 8bit is an error code, resultant fault sign indicating number AB.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010528930 CN101980176A (en) | 2010-10-29 | 2010-10-29 | Software error code transferring method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010528930 CN101980176A (en) | 2010-10-29 | 2010-10-29 | Software error code transferring method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101980176A true CN101980176A (en) | 2011-02-23 |
Family
ID=43600678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010528930 Pending CN101980176A (en) | 2010-10-29 | 2010-10-29 | Software error code transferring method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101980176A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103297401A (en) * | 2012-03-01 | 2013-09-11 | 腾讯科技(深圳)有限公司 | Error code returning method and device |
CN104765672A (en) * | 2014-01-03 | 2015-07-08 | 腾讯科技(深圳)有限公司 | Error code monitoring method, device and equipment |
CN106933742A (en) * | 2017-03-17 | 2017-07-07 | 数据通信科学技术研究所 | A kind of program error localization method |
CN109240703A (en) * | 2018-08-28 | 2019-01-18 | 郑州云海信息技术有限公司 | A kind of system mistake reminding method and device |
CN113626247A (en) * | 2021-08-26 | 2021-11-09 | 宁波菊风系统软件有限公司 | Error code transmission method in distributed system |
CN114546466A (en) * | 2022-04-24 | 2022-05-27 | 广州易方信息科技股份有限公司 | Error code generation method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070174705A1 (en) * | 2005-12-14 | 2007-07-26 | Inventec Corporation | Post (power on self test) debug system and method |
CN101197722A (en) * | 2007-12-29 | 2008-06-11 | 中国建设银行股份有限公司 | Multi-system error code management method, device and system |
CN101425038A (en) * | 2008-12-19 | 2009-05-06 | 北京中星微电子有限公司 | Method and system for searching software error |
CN101499031A (en) * | 2008-01-30 | 2009-08-05 | 鸿富锦精密工业(深圳)有限公司 | Software bug feedback system and method |
-
2010
- 2010-10-29 CN CN 201010528930 patent/CN101980176A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070174705A1 (en) * | 2005-12-14 | 2007-07-26 | Inventec Corporation | Post (power on self test) debug system and method |
CN101197722A (en) * | 2007-12-29 | 2008-06-11 | 中国建设银行股份有限公司 | Multi-system error code management method, device and system |
CN101499031A (en) * | 2008-01-30 | 2009-08-05 | 鸿富锦精密工业(深圳)有限公司 | Software bug feedback system and method |
CN101425038A (en) * | 2008-12-19 | 2009-05-06 | 北京中星微电子有限公司 | Method and system for searching software error |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103297401A (en) * | 2012-03-01 | 2013-09-11 | 腾讯科技(深圳)有限公司 | Error code returning method and device |
CN104765672A (en) * | 2014-01-03 | 2015-07-08 | 腾讯科技(深圳)有限公司 | Error code monitoring method, device and equipment |
CN104765672B (en) * | 2014-01-03 | 2017-12-01 | 腾讯科技(深圳)有限公司 | Error code monitoring method, device and equipment |
CN106933742A (en) * | 2017-03-17 | 2017-07-07 | 数据通信科学技术研究所 | A kind of program error localization method |
CN109240703A (en) * | 2018-08-28 | 2019-01-18 | 郑州云海信息技术有限公司 | A kind of system mistake reminding method and device |
CN113626247A (en) * | 2021-08-26 | 2021-11-09 | 宁波菊风系统软件有限公司 | Error code transmission method in distributed system |
CN113626247B (en) * | 2021-08-26 | 2024-03-22 | 宁波菊风系统软件有限公司 | Error code transmission method in distributed system |
CN114546466A (en) * | 2022-04-24 | 2022-05-27 | 广州易方信息科技股份有限公司 | Error code generation method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101980176A (en) | Software error code transferring method, device and system | |
CN107039088A (en) | Memory device, accumulator system and the method for the reparation result of verifying memory part | |
US8225067B2 (en) | Multilevel cell NAND flash memory storage system, and controller and access method thereof | |
CN103186466B (en) | Information interactive testing device and method based on association automatic generating test case | |
CN102084341B (en) | Cyclical redundancy code for use in a high-speed serial link | |
US10860258B2 (en) | Control circuit, memory device including the same, and method | |
CN102567193A (en) | Method and system for converting test case to automated testing script | |
CN102306122A (en) | Automated testing method and equipment | |
CN105786749B (en) | A kind of double channel A TA agreement bridge-sets based on NAND FLASH interfaces | |
CN105446865A (en) | Test method and device under multi-environment | |
CN109597653A (en) | Method, BIOS and the BMC of BIOS and BMC command interaction | |
US20200153461A1 (en) | Data storage system and associated method | |
CN110321292A (en) | Chip detecting method, device, electronic equipment and computer readable storage medium | |
US20110004817A1 (en) | Crc management method performed in sata interface and data storage device using crc management method | |
CN113742282A (en) | SATA IP core based on FPGA and data storage method | |
CN101853198B (en) | Detection method, equipment and system of address bus | |
CN106708445B (en) | Link selecting method and device | |
CN105513630A (en) | DRAM initialization method and device thereof | |
CN100449498C (en) | Data storage device | |
CN105373442A (en) | Method and device for monitoring data error status in a memory | |
CN111680000B (en) | Configuration system and method of field programmable gate array | |
CN101976219A (en) | Method and system for debugging automatic testing script and agent device | |
CN109995931A (en) | It is a kind of to realize the method and device called automatically | |
CN113495671B (en) | Read-write method and memory device | |
CN102819406A (en) | Front-end data storage method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110223 |