Movatterモバイル変換


[0]ホーム

URL:


CN113760720B - Method and device for displaying abnormal information of codes - Google Patents

Method and device for displaying abnormal information of codes
Download PDF

Info

Publication number
CN113760720B
CN113760720BCN202110018282.8ACN202110018282ACN113760720BCN 113760720 BCN113760720 BCN 113760720BCN 202110018282 ACN202110018282 ACN 202110018282ACN 113760720 BCN113760720 BCN 113760720B
Authority
CN
China
Prior art keywords
abnormal
item
information
configuration file
code
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.)
Active
Application number
CN202110018282.8A
Other languages
Chinese (zh)
Other versions
CN113760720A (en
Inventor
霍东明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN202110018282.8ApriorityCriticalpatent/CN113760720B/en
Publication of CN113760720ApublicationCriticalpatent/CN113760720A/en
Application grantedgrantedCritical
Publication of CN113760720BpublicationCriticalpatent/CN113760720B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a method and a device for displaying abnormal information of codes, and relates to the technical field of computers. One embodiment of the method comprises the following steps: monitoring the running of codes; when the code runs abnormally, determining a first abnormal item of the code; determining first abnormal information corresponding to a first abnormal item according to the abnormal configuration file; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively; the first anomaly information is presented in plain text. According to the embodiment, the problem of the program is intuitively displayed in a plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.

Description

Method and device for displaying abnormal information of codes
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying abnormal information of a code.
Background
In the process of program development, since the program is not complete, various problems are inevitably generated when the program runs in a compiler, and at this time, the compiler generates abnormal information for the problems when the program runs, so as to help a developer to check the problems.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
At present, the exception information generated by the compiler includes two types, namely, a code position where a problem occurs by generating Exception exception object reports and a problem type occurring by generating status code reports. However, the two modes are not intuitive enough for displaying the program problems, so that a developer cannot quickly check the problems, and a compiler randomly uses the two modes, so that the developer also needs to write extra codes to analyze abnormal information, and the problem checking efficiency of the developer is further reduced.
Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for displaying abnormal information of a code, which can determine a first abnormal item of the code when monitoring that the code runs abnormally, determine first abnormal information corresponding to the first abnormal item according to an abnormal configuration file, and display the first abnormal information in a plaintext form; the abnormal configuration file comprises a plurality of second abnormal items and second abnormal information in a plaintext form, wherein the second abnormal information corresponds to the second abnormal items respectively, so that the problem of the program is intuitively displayed in the plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an anomaly information display method of a code.
The method for displaying the abnormal information of the code comprises the following steps:
Monitoring the running of codes;
when the code runs abnormally, determining a first abnormal item of the code;
Determining first abnormal information corresponding to a first abnormal item according to the abnormal configuration file; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively;
the first anomaly information is presented in plain text.
Alternatively, the process may be carried out in a single-stage,
The plurality of second outlier items correspond to different levels;
Determining first anomaly information corresponding to a first anomaly item, including:
searching a second abnormal item of the highest level corresponding to the category in the abnormal configuration file according to the category to which the first abnormal item belongs;
and determining whether the second abnormal item of the highest level has a lower level item or not, and if not, taking second abnormal information corresponding to the second abnormal item of the highest level as first abnormal information.
Alternatively, the process may be carried out in a single-stage,
When it is determined that the second abnormal item of the highest hierarchy exists in the lower-level items, the method further includes:
Determining a lower item corresponding to the first abnormal item from the lower items of the second abnormal item according to the abnormal field in the first abnormal item;
and taking the second abnormal information corresponding to the determined subordinate item as the first abnormal information.
Alternatively, the process may be carried out in a single-stage,
The exception configuration file includes one or more language versions, the method further comprising:
Determining the language of the code running environment, determining the language version of the abnormal configuration file according to the language of the running environment, and displaying the first abnormal information according to the determined language version.
Alternatively, the process may be carried out in a single-stage,
The number of the abnormal configuration files is multiple, and the abnormal configuration files are stored in the online server;
After determining the first exception item of the code, comprising:
According to the first abnormal item, downloading an abnormal configuration file corresponding to the first abnormal item from the online server to the local, and determining first abnormal information corresponding to the first abnormal item according to the downloaded abnormal configuration file.
Alternatively, the process may be carried out in a single-stage,
The abnormal configuration file is stored in the online server;
After determining the first exception item of the code, comprising:
Acquiring a second abnormal item corresponding to the first abnormal item and second abnormal information corresponding to the second abnormal item from an abnormal configuration file of the online server according to the first abnormal item;
and generating and displaying the first abnormal information according to the second abnormal information.
Alternatively, the process may be carried out in a single-stage,
The first anomaly information includes any one or more of: anomaly encoding, anomaly description information in plaintext form, and anomaly resolution policies in plaintext form.
In order to achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an abnormality information presentation apparatus of a code.
The abnormal information display device of the code comprises a monitoring module, an abnormal item determining module, an abnormal information determining module and a display module; wherein:
the monitoring module is used for monitoring the running of the codes;
the abnormal item determining module is used for determining a first abnormal item of the code when the code runs abnormally;
The abnormal information determining module is used for determining first abnormal information corresponding to the first abnormal item according to the abnormal configuration file; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively;
And the display module is used for displaying the first abnormal information in a plaintext form.
In order to achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an abnormality information presentation electronic device of a code.
The electronic equipment for displaying the abnormal information of the code comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the abnormal information display method of the code.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements an abnormal information presentation method of a code of the embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: when monitoring that the code runs abnormally, a first abnormal item of the code can be determined, and according to an abnormal configuration file, first abnormal information corresponding to the first abnormal item is determined and displayed in a plaintext form; the abnormal configuration file comprises a plurality of second abnormal items and second abnormal information in a plaintext form, wherein the second abnormal information corresponds to the second abnormal items respectively, so that the problem of the program is intuitively displayed in the plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of main steps of an anomaly information presentation method of a code according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the main steps of a method for determining first anomaly information corresponding to a first anomaly item, according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of a code exception information presentation apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features in the embodiments may be combined with each other without collision.
Fig. 1 is a schematic diagram of main steps of a code anomaly information presentation method according to an embodiment of the present invention.
As shown in fig. 1, the method for displaying abnormal information of a code according to an embodiment of the present invention mainly includes the following steps:
step S101: the running of the code is monitored.
Step S102: when the code runs abnormally, a first abnormal item of the code is determined.
In an embodiment of the present invention, the first exception item of the code may be one or more captured statements of exceptions of the code during the running process. Wherein, each abnormal statement may contain an abnormal field, and the abnormal field may be the missing of a field, the redundancy of a field or the assignment of the field is inconsistent with the type of the field, etc.
Step S103: determining first abnormal information corresponding to a first abnormal item according to the abnormal configuration file; the exception configuration file includes: the plurality of second abnormal items and the plurality of second abnormal items correspond to the second abnormal information in the plaintext form respectively.
In the embodiment of the invention, when the code operation is abnormal and the information corresponding to the abnormality needs to be reported, the corresponding first abnormality information can be determined according to the first abnormality item of the code. In a preferred embodiment of the present invention, the first exception information may be passed to the caller of the information through ErrorMessage objects, errorMessage objects may be generated by the exception factory class, i.e., class ErrorMessageFactory, and specifically, class ErrorMessageFactory may construct ErrorMessage objects by a set of static methods in the corresponding class ErrorMessageBuilder, i.e., operation MessageResourceAccessor, to reduce the complexity of constructing various types of first exception information.
In the embodiment of the invention, the first abnormal item and the first abnormal information corresponding to the first abnormal item are recorded in an abnormal configuration file, and the abnormal configuration file can be stored in an online server or can be stored locally. The exception configuration file includes: a plurality of second abnormal items, and second abnormal information in a plain text form corresponding to the second abnormal items, respectively. When the code is running abnormally and the first abnormal item is captured, the first abnormal information corresponding to the first abnormal item can be hit from the plurality of pieces of second abnormal information of the abnormal configuration file according to the first abnormal item.
For example, the content of one exception configuration file may be:
Account.add-business-error \ AccountIsExistError = failure to add account number, current pin: [ {0} ] already exists;
Load-business-error \ PinNotExistError = object failure to load account, current pin: [ {0} ] does not exist;
Account.changeParent-business-error \ PinNotExistError = update parent pin failed, currently parent pin: [ {0} ] does not exist.
Wherein the second abnormal item Account.add-business-error corresponds to second abnormal information that the account number fails to be added and the current pin: [ {0} ] already exists; the second abnormal item Account.load-business-error is corresponding to second abnormal information, namely 'the object failure of loading account number, and the current pin: [ {0} ] does not exist'. When capturing the first abnormal item Account, add-business-error, the corresponding first abnormal information of "failure to add account number" is hit from the abnormal configuration file, and the current pin: [ {0} ] already exists.
In the embodiment of the invention, the second abnormal items in the abnormal configuration file can adopt a hierarchical structure design, namely, a plurality of second abnormal items correspond to different levels, and the higher the level is, the coarser granularity of second abnormal information obtained by analyzing the second abnormal items is; the lower the hierarchy, the finer the granularity of the second anomaly information resulting from the analysis of the second anomaly item.
Therefore, in the embodiment of the present invention, after determining the first abnormal item of the code, as shown in fig. 2, fig. 2 is a schematic diagram of main steps of a method for determining the first abnormal information corresponding to the first abnormal item according to an embodiment of the present invention, where the method mainly includes the following steps:
step S201: searching a second abnormal item of the highest level corresponding to the class in the abnormal configuration file according to the class to which the first abnormal item belongs;
step S202: determining whether the second abnormal item of the highest hierarchy has a lower item, if not, executing step S203, and if yes, executing steps S204-S205;
Step S203: taking second abnormal information corresponding to the second abnormal item of the highest level as first abnormal information;
step S204: determining a lower item corresponding to the first abnormal item from the lower items of the second abnormal item according to the abnormal field in the first abnormal item;
step S205: and taking the second abnormal information corresponding to the determined subordinate item as the first abnormal information.
In a preferred embodiment of the present invention, the second exception item in the exception configuration file corresponds to two levels, and thus the corresponding second exception information also includes two levels, namely a main exception portion and a sub exception portion. Wherein each sub-exception corresponds to a main exception, and each main exception may have several seed exceptions. Wherein the main anomaly part and the sub anomaly part of the second anomaly information can comprise any one or more of the following: anomaly encoding, anomaly description information in plaintext form, and anomaly resolution policies in plaintext form. When the main exception portion and/or the sub exception portion of the second exception information includes both the exception code and the exception description information in the plaintext form, the exception code and the exception description information in the plaintext form may be saved in the exception configuration file in the form of a key value pair.
For example, the content of one exception configuration file may be:
the main exception code in the second exception information is 7, which represents that the necessary filling parameter is not needed, and the exception description information message in the plaintext form also prompts the "the necessary filling parameter is not needed" so as to facilitate the developer to check the problem, and the exception solving strategy solution in the plaintext form is a processing plan proposed for the exception, and prompts the "please add the necessary filling parameter according to the description of the interface document so as to facilitate the developer to solve the problem. subErrors is a sub-anomaly information list, which contains two sub-anomalies, respectively: lack of parameters locale and lack of parameters pin. The sub-exception code is a character string for performing hierarchical coding according to the main exception type, such as a missing-parameter:6x, a 6 x-non-exist: invalid-7y, wherein 6x,7y are occupied fields, and can be replaced by corresponding exception fields according to specific exceptions.
In a preferred embodiment of the present invention, the exception configuration file provides a default framework DefaltErrorMessage for the second exception item, in which 13 master exceptions are defined, covering all possible master exception types, with the master exception portion not supporting extensions; the main exception type is a sub exception part support extension of business exception, and can be defined by a calling party by self, and the defined sub exception information is configured into an exception configuration file.
In the embodiment of the invention, the abnormal configuration file can also comprise one or more language versions, and the abnormal configuration file corresponding to each language version is respectively packaged and stored. When the code is abnormal in operation, the language of the code operation environment can be determined first, then the language version of the abnormal configuration file is determined according to the language of the operation environment, and the first abnormal information is displayed according to the determined language version, so that the application scene of the scheme is expanded, and the developer can read the first abnormal information conveniently.
In the embodiment of the invention, when a plurality of abnormal configuration files are stored in the online server, after the first abnormal item of the code is determined, the resource loader downloads the abnormal configuration file corresponding to the first abnormal item from the online server to the local according to the first abnormal item, and then the resource accessor determines the first abnormal information corresponding to the first abnormal item according to the downloaded abnormal configuration file. Specifically, the bottom layer of the loading of the abnormal configuration file by the resource loader is realized based on a java. Uteil. Resource bundle class provided by the JDK, the core realization of the processing of the abnormal configuration file is PropertyBundleMessageResource class, the class utilizes java. Uteil. Resource bundle to realize the loading of the abnormal configuration file, caches and manages the abnormal configuration file, and supports the management of the abnormal configuration files of multiple language versions; the resource accessor instantiates a MessageResource object through MessageResourceAccessor of the access tool class, and accesses the second exception item and the second exception information downloaded to the local exception configuration file through GETMESSAGE public method.
In the embodiment of the invention, when the abnormal configuration file is stored in the online server, the abnormal configuration file can also be directly traversed on the online server to hit the second abnormal information. Specifically: after determining the first abnormal item of the code, the second abnormal item corresponding to the first abnormal item and the second abnormal information corresponding to the second abnormal item can be obtained from the abnormal configuration file of the online server according to the first abnormal item, and the first abnormal information is generated and displayed according to the second abnormal information.
In an embodiment of the present invention, the first anomaly information may include any one or more of the following: anomaly encoding, anomaly description information in plaintext form, and anomaly resolution policies in plaintext form.
Step S104: the first anomaly information is presented in plain text.
In the embodiment of the invention, the first abnormal information is displayed in a plaintext form, so that the problem of code is intuitively displayed, and the efficiency of the developer in troubleshooting the problem is further improved.
According to the method for displaying the abnormal information of the code, which is disclosed by the embodiment of the invention, when the running abnormality of the code is monitored, a first abnormal item of the code can be determined, then according to an abnormal configuration file, first abnormal information corresponding to the first abnormal item is determined, and the first abnormal information is displayed in a plaintext form; the abnormal configuration file comprises a plurality of second abnormal items and second abnormal information in a plaintext form, wherein the second abnormal information corresponds to the second abnormal items respectively, so that the problem of the program is intuitively displayed in the plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.
Fig. 3 is a schematic diagram of main modules of an abnormality information presentation apparatus of a code according to an embodiment of the present invention.
As shown in fig. 3, an apparatus 300 for displaying exception information of a code according to an embodiment of the present invention includes a monitor module 301, an exception item determination module 302, an exception information determination module 303, and a display module 304; wherein:
a monitoring module 301, configured to monitor the running of the code;
An abnormal item determining module 302, configured to determine a first abnormal item of the code when the code runs abnormally;
An anomaly information determining module 303, configured to determine first anomaly information corresponding to a first anomaly item according to an anomaly configuration file; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively;
the display module 304 is configured to display the first anomaly information in a plaintext form.
In an embodiment of the present invention, the plurality of second abnormal items correspond to different levels; the anomaly information determination module 303 is further configured to: searching a second abnormal item of the highest level corresponding to the category in the abnormal configuration file according to the category to which the first abnormal item belongs; and determining whether the second abnormal item of the highest level has a lower level item or not, and if not, taking second abnormal information corresponding to the second abnormal item of the highest level as first abnormal information.
In the embodiment of the present invention, when it is determined that the second abnormal item of the highest hierarchy exists in the subordinate items, the abnormal information determining module 303 is further configured to: determining a lower item corresponding to the first abnormal item from the lower items of the second abnormal item according to the abnormal field in the first abnormal item; and taking the second abnormal information corresponding to the determined subordinate item as the first abnormal information.
In an embodiment of the present invention, the exception configuration file includes one or more language versions, and the exception information determining module 303 is further configured to: determining the language of the code running environment, determining the language version of the abnormal configuration file according to the language of the running environment, and displaying the first abnormal information according to the determined language version.
In the embodiment of the invention, a plurality of abnormal configuration files are provided, and the abnormal configuration files are stored in an online server; the anomaly information determination module 303 is further configured to: according to the first abnormal item, downloading an abnormal configuration file corresponding to the first abnormal item from the online server to the local, and determining first abnormal information corresponding to the first abnormal item according to the downloaded abnormal configuration file.
In the embodiment of the invention, the abnormal configuration file is stored in an online server; the anomaly information determination module 303 is further configured to: acquiring a second abnormal item corresponding to the first abnormal item and second abnormal information corresponding to the second abnormal item from an abnormal configuration file of the online server according to the first abnormal item; and generating and displaying the first abnormal information according to the second abnormal information.
In an embodiment of the present invention, the first anomaly information includes any one or more of: anomaly encoding, anomaly description information in plaintext form, and anomaly resolution policies in plaintext form.
According to the abnormal information display device of the code, when monitoring that the code runs abnormally, the abnormal information display device can determine the first abnormal item of the code, then determine the first abnormal information corresponding to the first abnormal item according to the abnormal configuration file, and display the first abnormal information in a plaintext form; the abnormal configuration file comprises a plurality of second abnormal items and second abnormal information in a plaintext form, wherein the second abnormal information corresponds to the second abnormal items respectively, so that the problem of the program is intuitively displayed in the plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.
Fig. 4 illustrates an exemplary system architecture 400 of a method of exhibiting exception information of a code or an apparatus of exhibiting exception information of a code to which an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and an electronic device 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the electronic device 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the electronic device 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The electronic device 405 may be a server providing various services, such as a background management server providing support for shopping-type websites browsed by the user using the terminal devices 401, 402, 403. The background management server can analyze and other processing on the received data such as the product information inquiry request and the like, and feed back processing results (such as target push information and product information) to the terminal equipment.
It should be noted that, the method for displaying the code abnormal information provided in the embodiment of the present invention is generally executed by the electronic device 405, and accordingly, the device for displaying the code abnormal information is generally disposed in the electronic device 405.
It should be understood that the number of terminal devices, networks and electronic devices in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and electronic devices, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a monitoring module, an abnormal item determining module, an abnormal information determining module and a display module. The names of these modules do not constitute a limitation on the module itself in some cases, for example, a snoop module may also be described as a "module for snooping the execution of code".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: monitoring the running of codes; when the code runs abnormally, determining a first abnormal item of the code; determining first abnormal information corresponding to a first abnormal item according to the abnormal configuration file; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively; the first anomaly information is presented in plain text.
According to the technical scheme of the embodiment of the invention, when the running abnormality of the code is monitored, a first abnormal item of the code can be determined, and according to the abnormal configuration file, first abnormal information corresponding to the first abnormal item is determined and displayed in a plaintext form; the abnormal configuration file comprises a plurality of second abnormal items and second abnormal information in a plaintext form, wherein the second abnormal information corresponds to the second abnormal items respectively, so that the problem of the program is intuitively displayed in the plaintext form, and the efficiency of the developer in troubleshooting the problem is improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (9)

Determining first abnormal information corresponding to the first abnormal item according to the abnormal configuration file; the method specifically comprises the following steps: searching a second abnormal item of the highest level corresponding to the category in the abnormal configuration file according to the category to which the first abnormal item belongs; determining whether a lower-level item exists in the second abnormal item of the highest level, and if not, taking second abnormal information corresponding to the second abnormal item of the highest level as the first abnormal information; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively, the plurality of second abnormal items corresponding to different levels;
The abnormal information determining module is used for determining first abnormal information corresponding to the first abnormal item according to an abnormal configuration file; the method is particularly used for: searching a second abnormal item of the highest level corresponding to the category in the abnormal configuration file according to the category to which the first abnormal item belongs; determining whether a lower-level item exists in the second abnormal item of the highest level, and if not, taking second abnormal information corresponding to the second abnormal item of the highest level as the first abnormal information; the exception configuration file includes: a plurality of second abnormal items and second abnormal information in a plaintext form corresponding to the plurality of second abnormal items, respectively, the plurality of second abnormal items corresponding to different levels;
CN202110018282.8A2021-01-072021-01-07Method and device for displaying abnormal information of codesActiveCN113760720B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110018282.8ACN113760720B (en)2021-01-072021-01-07Method and device for displaying abnormal information of codes

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110018282.8ACN113760720B (en)2021-01-072021-01-07Method and device for displaying abnormal information of codes

Publications (2)

Publication NumberPublication Date
CN113760720A CN113760720A (en)2021-12-07
CN113760720Btrue CN113760720B (en)2024-10-18

Family

ID=78786262

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110018282.8AActiveCN113760720B (en)2021-01-072021-01-07Method and device for displaying abnormal information of codes

Country Status (1)

CountryLink
CN (1)CN113760720B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106874163A (en)*2016-12-292017-06-20广州华多网络科技有限公司A kind of method and system for showing software error code information
CN108446185A (en)*2018-03-272018-08-24武汉斗鱼网络科技有限公司Abnormality eliminating method, device, electric terminal and readable storage medium storing program for executing

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8250544B2 (en)*2008-03-052012-08-21Microsoft CorporationAnnotating exception information in a computer program
US9081595B1 (en)*2011-12-062015-07-14The Mathworks, Inc.Displaying violated coding rules in source code
CN103019874B (en)*2012-12-132016-01-27中国电子科技集团公司第十五研究所Method and the device of abnormality processing is realized based on data syn-chronization
CN105718369A (en)*2016-01-192016-06-29国家电网公司Computer software test abnormity processing system and test method
US9870306B2 (en)*2016-01-262018-01-16International Business Machines CorporationException prediction before an actual exception during debugging
CN110196790A (en)*2018-02-242019-09-03北京京东尚科信息技术有限公司The method and apparatus of abnormal monitoring
US20190294796A1 (en)*2018-03-232019-09-26Microsoft Technology Licensing, LlcResolving anomalies for network applications using code injection
CN109376025A (en)*2018-09-032019-02-22平安普惠企业管理有限公司Abnormality eliminating method, device, computer equipment and storage medium
CN111984444A (en)*2020-07-242020-11-24五八有限公司 A kind of abnormal information processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106874163A (en)*2016-12-292017-06-20广州华多网络科技有限公司A kind of method and system for showing software error code information
CN108446185A (en)*2018-03-272018-08-24武汉斗鱼网络科技有限公司Abnormality eliminating method, device, electric terminal and readable storage medium storing program for executing

Also Published As

Publication numberPublication date
CN113760720A (en)2021-12-07

Similar Documents

PublicationPublication DateTitle
CN108920222B (en)Business processing method and device based on rule engine
CN107491488B (en)Page data acquisition method and device
CN111190888A (en)Method and device for managing graph database cluster
CN113762910B (en)Document monitoring method and device
CN111427701A (en)Workflow engine system and business processing method
CN110324209B (en)Micro-service system monitoring method and device, electronic equipment and computer readable medium
US9374417B1 (en)Dynamic specification auditing for a distributed system
CN113900834A (en)Data processing method, device, equipment and storage medium based on Internet of things technology
CN111414154A (en)Method and device for front-end development, electronic equipment and storage medium
CN112214250A (en)Application program assembly loading method and device
CN112650804A (en)Big data access method, device, system and storage medium
CN110795135A (en) A method and apparatus for realizing annotated configuration
CN113535439B (en) Service request processing method, device, device and storage medium
CN112463616B (en) A chaos testing method and device for Kubernetes container platform
CN113760720B (en)Method and device for displaying abnormal information of codes
CN118467299A (en) Process management method and device
CN113806326A (en) Database design method, device and related equipment
CN116258461A (en) A business process orchestration method, execution method and device
CN113746661B (en) A business processing method and device
CN113760693B (en) Method and device for local debugging of microservice system
CN113138772B (en)Construction method and device of data processing platform, electronic equipment and storage medium
CN112559001B (en)Method and device for updating application
CN112306723B (en)Operation information acquisition method and device applied to applet
CN114721740A (en)Message triggering method, device, equipment and storage medium
CN113778847A (en)Test report generation method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp