Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for automatically converting program error codes into error descriptions

A technology of error coding and program error, which is applied in the field of electric power, can solve problems such as heavy workload, error-prone, wrong coding is not easy to remember and understand, and achieve the effect of improving work efficiency

Inactive Publication Date: 2016-05-04
HUZHOU ELECTRIC POWER SUPPLY CO OF STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +2
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Error codes in numerical form are not easy to memorize and understand. In order to convert error codes into error descriptions, the conventional program implementation method is through if...else...or switch...case...
This method is easy to use when the error code is fixed and the number is small, but when the error code changes frequently or the number is large, it is necessary to frequently modify the program code that converts the error code into an error description, and the workload is heavy and easy. go wrong

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] In order to facilitate the understanding of those skilled in the art, the present invention will be further described below in conjunction with specific embodiments:

[0026] A method for automatically converting program error codes into error descriptions includes steps of parsing error code description documents and converting error codes into error descriptions.

[0027] The steps to parse the error encoding description document include:

[0028] Step 1: Read the error code description file, parse the first line of error code description text, obtain the error code and the corresponding error description, establish the mapping relationship between the error code and the error description, and put it into the memory;

[0029] Step 2: Determine whether it is the last line of error code description text, if yes, then end the step of parsing the error code description document, if not, parse the next line of error description text, obtain the error code and error descrip...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The method discloses a method for automatically converting program error codes into error descriptions in order to realize a purpose. The method comprises following steps: a step of analyzing an error code description document, obtaining all error codes and error information from the error code description document, building a mapping relation of the error codes and error descriptions; and a step of converting the error codes into the error descriptions, searching the error descriptions corresponding to the error codes according to the input error codesand outputting the error descriptions. In application of the method disclosed bythe invention, following beneficial technical effects can be obtained; the error codes are automatically converted into the error descriptions when the error codes change and the working efficiencyis improved.

Description

technical field [0001] The invention relates to the field of electric power, in particular to a method for automatically converting program error codes into error descriptions. Background technique [0002] Computer software systems usually need to define error codes, which are used to transmit exceptions during software execution and facilitate the location of abnormal causes. [0003] In order to unify the understanding of error codes, error codes are usually expressed by an integer data, and each error code corresponds to an error category. For example, ERROR_OK code can be used to indicate "success". [0004] The corresponding value and meaning of the specific error code will be given in the documentation. Specific programming languages ​​have their agreed code file conventions for expressing the meaning of error codes: For example, for C / C++ programs, error codes are given by header files. [0005] Error codes in numerical form are not easy to memorize and understand...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/45
CPCG06F8/44
Inventor 费冬虎李也白丁学峰陆生兵
Owner HUZHOU ELECTRIC POWER SUPPLY CO OF STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products