CN110399275B - Exception display method and device - Google Patents
Exception display method and device Download PDFInfo
- Publication number
- CN110399275B CN110399275B CN201910651670.2A CN201910651670A CN110399275B CN 110399275 B CN110399275 B CN 110399275B CN 201910651670 A CN201910651670 A CN 201910651670A CN 110399275 B CN110399275 B CN 110399275B
- Authority
- CN
- China
- Prior art keywords
- abnormal
- current page
- information
- exception
- suspension layer
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- User Interface Of Digital Computer (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an abnormity display method and device, wherein the method comprises the following steps: setting an abnormal function callback in the js context to acquire abnormal information generated by service triggering abnormity in the current page; analyzing the acquired abnormal information to obtain corresponding abnormal detailed information; setting an abnormal occurrence prompt in the current page by using the suspension layer; and receiving user trigger operation on the suspension layer, and displaying a display page containing abnormal detailed information. By setting the callback of the abnormal function in the js context, the abnormal information generated by any abnormality can be ensured to be acquired, and the abnormality occurrence prompt is set by using the suspension layer, so that the problems of processing omission and the like caused by no obvious abnormality of the page are avoided. And displaying the detailed abnormal information in the display page to realize abnormal visualization, so that the abnormality can be conveniently processed.
Description
Technical Field
The invention relates to the field of software, in particular to an exception display method and device.
Background
In the development process of the client application of the ios system, the JSContext can be used for processing JavaScript, and the h5 page and native interaction is realized. During the process of loading and executing JavaScript, a scene of JavaScript exception can often occur. Sometimes, the abnormality can directly cause flash back and the like, and at the moment, the development can directly notice the abnormal phenomenon so as to carry out abnormal problem troubleshooting on the abnormality. However, in most cases, when the method is applied to an execution process, an obvious exception phenomenon does not occur on a page, but instead JavaScript execution already sends an exception, and subsequent processing logic is affected or interrupted. However, at this time, the page does not display the abnormality, so that developers or testers cannot quickly and timely find the abnormality to locate the abnormality.
To solve the above problem, the prior art adopts a processing framework based on IOS system application abnormal crash as disclosed in patent document No. 201710946409.6, which includes: the abnormal behavior capturing module intercepts a notification signal causing abnormal breakdown, calls monitoring to capture abnormal information and sends the abnormal information to the application server; the public abnormal mechanism processing module intercepts corresponding message transmission according to the abnormal information captured by the abnormal behavior capturing module and acquires abnormal repairing information from the configuration management module to repair the abnormal; the configuration management module is used for locally acquiring the abnormal repairing information corresponding to the abnormal information, or loading an HTML (hypertext markup language) page without an interface to load a JS (JavaScript) file issued by the server, and interactively acquiring the abnormal repairing information in the JS file through JS and a native code; and the service interface module is used for sending the abnormal information of the abnormal behavior capturing module to the application server and sending the JS file containing the abnormal repairing information sent by the server to the configuration management module. However, the above patent documents are complicated to handle the exception, and a JS file of the corresponding exception repair information needs to be set in the server in advance, which is not suitable for various exceptions encountered in the development process and the test process, and it is often impossible to determine which exceptions will occur in the development process, and it is impossible to prepare the JS file containing the exception repair information in advance. Further, since the abnormality is directly sent to the server, developers or testers cannot intuitively know the abnormal condition and cannot timely handle the abnormality. Or, in the prior art, abnormal information can be captured through a self-contained console log window of a development tool of an IOS application program, such as Xcode, but the abnormal information needs to be connected with a computer, a safrai browser is used, and the abnormal information is checked through a JSCContext examiner in a developer mode, so that the method is inconvenient, low in efficiency and high in timeliness requirement.
Therefore, a method for visually displaying the abnormality to a developer or a tester is needed, so that the developer or the tester can rapidly and effectively handle the abnormality.
Disclosure of Invention
In view of the above, the present invention is proposed in order to provide an anomaly display method and apparatus that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided an exception presentation method, including:
setting an abnormal function callback in the js context to acquire abnormal information generated by service triggering abnormity in the current page;
analyzing the acquired abnormal information to obtain corresponding detailed abnormal information;
setting an abnormal occurrence prompt in the current page by using the suspension layer;
and receiving user trigger operation on the floating layer, and displaying a display page containing abnormal detailed information.
Optionally, the detailed anomaly information includes: exception description information, stack information, and/or code location information corresponding to the exception.
Optionally, setting an exception function callback in the js context to acquire exception information generated by a service triggering exception in the current page further includes:
acquiring identification information of a current page, and counting the number of triggered exceptions on the current page according to the identification information of the current page;
the method for setting the abnormal occurrence reminding by utilizing the suspension layer in the current page further comprises the following steps:
displaying the abnormal number by using the suspension layer in the current page to remind the occurrence of the abnormality; and the abnormal number displayed by the suspension layer corresponds to the identification information of the current page one by one.
Optionally, the setting of the abnormal occurrence reminder by using the suspension layer in the current page further includes:
and displaying the abnormal number by utilizing a preset reminding format suspension layer in the current page to remind the occurrence of the abnormality.
Optionally, displaying the abnormal number by using the suspension layer in the current page to remind the abnormal occurrence further includes:
judging whether a current page has a suspension layer corresponding to the identification information of the current page;
if so, updating the number of the abnormal displayed by the existing suspension layer;
if not, creating a suspension layer on the current page to display the abnormal number so as to remind the occurrence of the abnormality.
Optionally, the method further comprises:
when the current page jumps to other pages, the hook cancels the suspension layer except the current page;
judging whether the other pages have abnormal numbers corresponding to the identification information of the other pages;
and if so, creating a suspension layer in other pages to display the abnormal number corresponding to the identification information of the other pages.
Optionally, the method further comprises:
receiving a preset operation triggered by the abnormal detailed information in the display page, and processing the abnormal detailed information; the preset operation comprises a copying operation, a sharing operation and/or a report generating operation.
According to another aspect of the present invention, there is provided an abnormality displaying apparatus including:
the callback module is suitable for setting exception function callback in js context so as to acquire exception information generated by service triggering exception in the current page;
the analysis module is suitable for analyzing the acquired abnormal information to obtain corresponding abnormal detailed information;
the reminding module is suitable for setting abnormal occurrence reminding in the current page by utilizing the suspension layer;
and the display module is suitable for receiving user trigger operation on the suspension layer and displaying a display page containing abnormal detailed information.
Optionally, the exception detail information includes: exception description information, stack information, and/or code location information corresponding to the exception.
Optionally, the callback module is further adapted to:
acquiring identification information of a current page, and counting the number of triggered exceptions on the current page according to the identification information of the current page;
the reminder module is further adapted to:
displaying the abnormal number by using the suspension layer in the current page to remind the occurrence of the abnormality; and the abnormal number displayed by the suspension layer corresponds to the identification information of the current page one by one.
Optionally, the reminder module is further adapted to:
and displaying the abnormal number by utilizing a preset reminding format suspension layer in the current page to remind the occurrence of the abnormality.
Optionally, the reminder module is further adapted to:
judging whether a current page has a suspension layer corresponding to the identification information of the current page;
if so, updating the number of the abnormal displayed by the existing suspension layer;
if not, creating a suspension layer on the current page to display the abnormal number so as to remind the occurrence of the abnormality.
Optionally, the apparatus further comprises:
the skipping module is suitable for hooking and removing the suspension layer except the current page when skipping from the current page to other pages; judging whether the other pages have abnormal numbers corresponding to the identification information of the other pages; and if so, creating a suspension layer in other pages to display the abnormal number corresponding to the identification information of the other pages.
Optionally, the apparatus further comprises:
the operation processing module is suitable for receiving preset operation triggered by the abnormal detailed information in the display page and processing the abnormal detailed information; the preset operation comprises a copying operation, a sharing operation and/or a report generating operation.
According to still another aspect of the present invention, there is provided an electronic apparatus including: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the exception display method.
According to another aspect of the present invention, a computer storage medium is provided, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform an operation corresponding to the above-mentioned exception presentation method.
According to the exception display method and device provided by the invention, an exception function callback is set in a js context so as to acquire exception information generated by service triggering exception in a current page; analyzing the acquired abnormal information to obtain corresponding detailed abnormal information; setting an abnormal occurrence prompt in the current page by using the suspension layer; and receiving user trigger operation on the floating layer, and displaying a display page containing abnormal detailed information. By setting the callback of the abnormal function in the js context, the abnormal information generated by any abnormality can be ensured to be acquired, and the abnormality occurrence prompt is set by using the suspension layer, so that the problems of processing omission and the like caused by no obvious abnormality of the page are avoided. And displaying the detailed abnormal information in the display page to realize abnormal visualization, so that the abnormality can be conveniently processed.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a flow diagram of an exception presentation method according to one embodiment of the present invention;
FIG. 2 shows a flow diagram of an exception presentation method according to another embodiment of the present invention;
FIG. 3 shows a schematic diagram of an exception presentation, according to one embodiment of the present invention;
FIG. 4 shows a functional block diagram of an exception presentation apparatus according to one embodiment of the present invention;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The invention is mainly convenient for developers or testers to quickly and timely find the abnormity generated in the js running process in the development process or the testing process, and avoids the problems of abnormity, missed processing and the like caused by no obvious abnormity of the page. And the abnormity information generated by the abnormity is acquired, so that a developer or a tester can conveniently and pertinently solve the abnormity. The user in the invention is generally a developer or a tester, and the invention is applied to a development environment or a test environment.
FIG. 1 shows a flow diagram of an exception presentation method according to one embodiment of the invention. As shown in fig. 1, the method for displaying an anomaly specifically includes the following steps:
and step S101, setting an abnormal function callback in the js context to acquire abnormal information generated by service triggering abnormity in the current page.
Based on the application run by the IOS system client, the js context (jsContext) can process JavaScript running, and the js context (jsContext) contains various information such as variables, objects, functions and the like in the JavaScript running. And setting an abnormal function callback in the js context, and when any service operation is executed in the current page, if the trigger exception (such as the js exception and the exception which does not meet the service standard in the running process of the service) occurs, calling back the set abnormal function, and acquiring the abnormal information generated by the trigger exception from the js context. Specifically, after the application is started, js context is initialized correspondingly, and an exceptinonHandler exception function callback is set. When business operation in application is executed, when Exception is triggered, the exceptinonHandler is called back to capture Exception information Exception.
And step S102, analyzing the acquired abnormal information to obtain corresponding abnormal detailed information.
And the exception function analyzes the acquired exception information and further obtains exception detailed information comprising exception description information, stack information and code position information corresponding to the exception. Exception description information such as exception type, error content and the like, stack information such as calling function name, link address, port information and the like; the code position information corresponding to the exception is, for example, the number of lines and columns of the code executed when the exception is triggered.
And step S103, setting an abnormal occurrence prompt in the current page by utilizing the suspension layer.
After the abnormal detailed information is obtained, a floating layer is generated in the current page by using the FloatView and is suspended above the current page, so that a user can be reminded of the occurrence of the abnormality in the current page conveniently.
And step S104, receiving user trigger operation on the floating layer, and displaying a display page containing abnormal detailed information.
When user trigger operation of a user on the suspension layer is received, for example, the suspension layer is clicked, a display page containing abnormal detailed information can be displayed on the current page, the user can visually know various abnormal detailed information generated by the abnormal occurrence on the display page, the abnormity can be conveniently checked according to the abnormal detailed information, and the abnormal problem can be timely and quickly solved.
According to the exception display method provided by the invention, an exception function callback is set in js context so as to acquire exception information generated by service triggering exception in the current page; analyzing the acquired abnormal information to obtain corresponding abnormal detailed information; setting an abnormal occurrence prompt in the current page by using the suspension layer; and receiving user trigger operation on the floating layer, and displaying a display page containing abnormal detailed information. By setting the exception function callback in the js context, the exception information generated by any exception can be ensured to be acquired, and the exception occurrence prompt is set by using the suspension layer, so that the problems of exception missing processing and the like caused by no obvious exception on the page are avoided. And displaying the detailed abnormal information in the display page to realize abnormal visualization, so that the abnormality can be conveniently processed.
FIG. 2 shows a flow diagram of an exception presentation method according to another embodiment of the invention. As shown in fig. 2, the method for displaying an abnormality specifically includes the following steps:
step S201, an abnormal function callback is set in the js context to acquire abnormal information generated by service triggering abnormity in the current page.
And (4) setting an abnormal function callback in the js context, and calling back the abnormal function when the abnormity is triggered, so that the abnormal information generated by the abnormity can be acquired. When the abnormal information is obtained, the identification information of the current page also needs to be obtained at the same time. The identification information of the page can uniquely mark one page. According to the identification information of the current page, the number of the abnormal conditions triggered on the current page can be counted. The initial value of the number of the exceptions of the current page is 0, and after the exceptions are triggered, one is added when the number of the exceptions is counted. The abnormal number is bound with the current page, and the identification information of the current page, the corresponding abnormal number of the current page and the like can be recorded in the memory.
Step S202, analyzing the acquired abnormal information to obtain corresponding abnormal detailed information.
The abnormal function analyzes the abnormal information to obtain the detailed abnormal information, and a user can conveniently process the abnormality according to the detailed abnormal information.
Step S203, displaying the abnormal number by utilizing a preset reminding format in the current page to remind the occurrence of the abnormality.
When the exception is triggered, as shown in the left diagram of fig. 3, the floating layer enclosed by the dotted line is displayed at the middle position on the right side of the current page. The display position of the suspension layer may be set according to the implementation, and is here for illustration and not limited. The suspension layer is displayed in a preset reminding format, and the preset reminding format adopts a striking format so as to conveniently remind a user of abnormal occurrence, for example, the suspension layer is in a red dot format, and red is used as the suspension layer to display colors and the like. And displaying the abnormal number of the current page in the suspension layer, and reminding a user of the abnormal times of the current page. The number of the abnormal numbers is shown as a number "11" shown by the suspension layer in the left diagram of fig. 3, and the abnormal numbers can be displayed by adopting a color different from that of the suspension layer, and the specific display format is set according to the implementation situation, which is not limited here.
It should be noted that the number of the exceptions displayed by the suspension layer corresponds to the identification information of the current page one by one, and the number of the exceptions displayed by the suspension layer of different pages is the number of the exceptions corresponding to the identification information of the page one by one. Further, when an exception is triggered, before a suspension layer is created in a current page and an exception occurrence prompt is set, whether the current page has a suspension layer corresponding to identification information of the current page is judged, that is, whether the current page has the suspension layer already created or not, if yes, the number of exceptions displayed by the existing suspension layer can be directly updated, if the number of exceptions displayed by the existing suspension layer is 10, an exception is triggered in the current page, the number of exceptions is counted to be 11, and the number of exceptions displayed by the existing suspension layer is updated to be 11; if not, a suspension layer needs to be established on the current page, and the number of the exceptions is displayed in the suspension layer to remind the exception.
Further, when the current page jumps to other pages, because the number of the abnormal states displayed by the suspension layer of the current page is the number of the abnormal times triggered by the current page, the number of the abnormal states of the current page should not be displayed when the current page jumps to other pages, and the suspension layer except the current page needs to be hooked and cancelled first. Judging whether the other pages have abnormal numbers corresponding to the identification information of the other pages; if so, namely the triggered abnormal times of other pages are greater than 0, creating a suspension layer in the other pages, and displaying the abnormal number corresponding to the identification information of the other pages by using the suspension layer; if not, namely other pages are not executed or the exception is not triggered, the method can only jump to other pages without creating a suspension layer. And when the other pages trigger the abnormity, establishing a suspension layer on the other pages to remind the abnormity. The abnormal number corresponding to the identification information of each page can be stored in the memory, so that the abnormal number corresponding to the identification information of each page can be conveniently obtained from the memory in the page jump process. The identification information of the page stored in the memory and the corresponding time of the abnormal number can be deleted at the time of ending the development process or the test process or stopping the development process or the test process.
And step S204, receiving user trigger operation on the suspension layer, and displaying a display page containing abnormal detailed information.
And receiving user trigger operation of the user on the suspension layer, such as click operation, and displaying the display page shown on the right side of the figure 3. The display page contains the detailed information of the exception. The display mode of the detailed abnormal information may be any one of the two display pages shown on the right side of fig. 3, or other display modes may be adopted, where the detailed abnormal information is displayed to facilitate a user to know the abnormality from the display pages, and then the abnormality is checked. According to the detail information of the abnormity displayed on the display page, a check conclusion of the abnormity can be obtained. If the code file at the code position information corresponding to the exception has XXX corresponding to the code with row number and column number, the code executes the exception.
Step S205, receiving a preset operation triggered by the abnormal detailed information in the display page, and processing the abnormal detailed information.
The display page also provides preset operation for the user, so that the user can conveniently process the abnormal detailed information. The preset operation comprises a copying operation, a sharing operation, a report generating operation and the like. The preset operation may be, as shown in the right-side diagram of fig. 3, receiving a trigger operation of a user on an arrow in the upper right corner of the display page, copying the detailed abnormal information in the display page, and allowing the user to paste the detailed abnormal information to a desired position; or, sharing the abnormal detailed information to other users and the like; or, the detailed abnormal information can be exported to generate a report. According to specific requirements of a user, various preset operations can be set in the display page, and the user can conveniently process abnormal detailed information.
According to the abnormity display method provided by the invention, a user can conveniently and visually check the detail abnormity information generated by the abnormity triggered by each page, and the user can check the abnormity triggered by the current page on the current page, position the triggered abnormity, conveniently check and correct the abnormity again, and then test whether the abnormity is repaired or not. Furthermore, the display page also provides various preset operations for processing the abnormal detailed information, so that the user can conveniently process the abnormal detailed information according to the requirement of the user.
FIG. 4 shows a functional block diagram of an exception presentation apparatus according to one embodiment of the present invention. As shown in fig. 4, the anomaly display device includes the following modules:
the callback module 410 is adapted to: and setting an exception function callback in the js context to acquire exception information generated by service triggering exception in the current page.
The parsing module 420 is adapted to: and analyzing the acquired abnormal information to obtain corresponding detailed abnormal information.
The reminder module 430 is adapted to: and setting an abnormal occurrence prompt in the current page by using the suspension layer.
The display module 440 is adapted to: and receiving user trigger operation on the floating layer, and displaying a display page containing abnormal detailed information.
Optionally, the callback module 410 is further adapted to: acquiring identification information of a current page, and counting the number of triggered exceptions on the current page according to the identification information of the current page;
the reminder module 430 is further adapted to: displaying the abnormal number by using the suspension layer in the current page to remind the occurrence of the abnormality; and the abnormal number displayed by the suspension layer corresponds to the identification information of the current page one by one.
Optionally, the reminder module 430 is further adapted to: and displaying the abnormal number by utilizing a preset reminding format suspension layer in the current page to remind the occurrence of the abnormality.
Optionally, the reminder module 430 is further adapted to: judging whether a current page has a suspension layer corresponding to the identification information of the current page; if so, updating the number of the abnormal displayed by the existing suspension layer; if not, creating a suspension layer on the current page to display the abnormal number so as to remind the occurrence of the abnormality.
Optionally, the apparatus further comprises: a skip module 450.
The skip module 450 is adapted to: when the current page jumps to other pages, the hook cancels the suspension layer except the current page; judging whether the other pages have abnormal numbers corresponding to the identification information of the other pages; and if so, creating a suspension layer in other pages to display the abnormal number corresponding to the identification information of the other pages.
Optionally, the apparatus further comprises: the processing module 460 is operated.
The operation processing module 460 is adapted to: receiving a preset operation triggered by abnormal detailed information in a display page, and processing the abnormal detailed information; the preset operation comprises a copying operation, a sharing operation and/or a report generating operation.
The descriptions of the modules refer to the corresponding descriptions in the method embodiments, and are not repeated herein.
The application also provides a nonvolatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the exception display method in any method embodiment.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 5, the electronic device may include: a processor (processor) 502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein:
the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically perform the relevant steps in the above-described exception presentation method embodiment.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement an embodiment of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be configured to enable the processor 502 to execute the exception presentation method in any of the above-described method embodiments. For specific implementation of each step in the program 510, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing exception display embodiment, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the exception presentation apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Claims (9)
1. A method of exception presentation, comprising:
setting an abnormal function callback in the js context to acquire abnormal information generated by service triggering abnormity in the current page and acquiring identification information of the current page, and counting the number of abnormal triggers on the current page according to the identification information of the current page;
analyzing the acquired abnormal information to obtain corresponding abnormal detailed information;
displaying the abnormal number by using the suspension layer in the current page to remind the occurrence of the abnormality; the number of the displayed abnormal pages of the suspension layer corresponds to the identification information of the current page one by one;
and receiving user trigger operation on the suspension layer, and displaying a display page containing the abnormal detailed information.
2. The method of claim 1, wherein the exception details comprise: exception description information, stack information, and/or code location information corresponding to the exception.
3. The method of claim 1, wherein the displaying the number of exceptions in the current page with a hover layer to alert of the occurrence of an exception comprises:
and displaying the abnormal number in the current page by utilizing a preset reminding format suspension layer to remind the occurrence of the abnormality.
4. The method of claim 1, wherein the displaying the number of exceptions with the hover layer in the current page to alert the occurrence of exceptions further comprises:
judging whether a current page has a suspension layer corresponding to the identification information of the current page;
if so, updating the number of the abnormal displayed by the existing suspension layer;
if not, a suspension layer is established on the current page to display the abnormal number so as to remind the occurrence of the abnormality.
5. The method of claim 1, wherein the method further comprises:
when the current page jumps to other pages, the hook cancels the suspension layer except the current page;
judging whether the other pages have abnormal numbers corresponding to the identification information of the other pages;
and if so, creating a suspension layer in other pages to display the abnormal number corresponding to the identification information of the other pages.
6. The method according to any one of claims 1-5, wherein the method further comprises:
receiving a preset operation triggered by the detailed abnormal information in the display page, and processing the detailed abnormal information; the preset operation comprises a copying operation, a sharing operation and/or a report generating operation.
7. An exception display apparatus, comprising:
the callback module is suitable for setting callback of an abnormal function in js context so as to acquire abnormal information generated by service triggering abnormity in the current page, acquire identification information of the current page and count the number of the abnormal triggering on the current page according to the identification information of the current page;
the analysis module is suitable for analyzing the acquired abnormal information to obtain corresponding abnormal detailed information;
the reminding module is suitable for displaying the abnormal number by utilizing the suspension layer in the current page to remind the occurrence of the abnormality; the number of the displayed abnormal pages of the suspension layer corresponds to the identification information of the current page one by one;
and the display module is suitable for receiving user trigger operation on the suspension layer and displaying a display page containing the abnormal detailed information.
8. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the exception presentation method according to any one of claims 1-6.
9. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the exception presentation method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910651670.2A CN110399275B (en) | 2019-07-18 | 2019-07-18 | Exception display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910651670.2A CN110399275B (en) | 2019-07-18 | 2019-07-18 | Exception display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110399275A CN110399275A (en) | 2019-11-01 |
CN110399275B true CN110399275B (en) | 2023-02-03 |
Family
ID=68324646
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910651670.2A Active CN110399275B (en) | 2019-07-18 | 2019-07-18 | Exception display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399275B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111338739B (en) * | 2020-03-17 | 2024-05-31 | 北京车智赢科技有限公司 | Page content processing method, page content display method and page content display system |
CN113448827A (en) * | 2020-03-26 | 2021-09-28 | 北京沃东天骏信息技术有限公司 | Test data processing method and device |
CN111796897A (en) * | 2020-07-03 | 2020-10-20 | 北京达佳互联信息技术有限公司 | Page display method and device, storage medium and electronic equipment |
CN113760588A (en) * | 2020-11-04 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Method and device for acquiring abnormal information of software system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354126A (en) * | 2015-10-13 | 2016-02-24 | 金蝶软件(中国)有限公司 | Method and device for monitoring exception in page script file |
CN109165372A (en) * | 2018-08-09 | 2019-01-08 | 深圳乐信软件技术有限公司 | A kind of webpage loading method, device, equipment and storage medium |
CN109358975A (en) * | 2018-09-28 | 2019-02-19 | 珠海市君天电子科技有限公司 | A kind of analysis method, device, electronic equipment and storage medium that software is operating abnormally |
CN109783309A (en) * | 2018-12-14 | 2019-05-21 | 平安普惠企业管理有限公司 | The abnormality monitoring method and device of webpage load |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10067812B2 (en) * | 2015-03-30 | 2018-09-04 | Ca, Inc. | Presenting diagnostic headlines using simple linguistic terms |
-
2019
- 2019-07-18 CN CN201910651670.2A patent/CN110399275B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354126A (en) * | 2015-10-13 | 2016-02-24 | 金蝶软件(中国)有限公司 | Method and device for monitoring exception in page script file |
CN109165372A (en) * | 2018-08-09 | 2019-01-08 | 深圳乐信软件技术有限公司 | A kind of webpage loading method, device, equipment and storage medium |
CN109358975A (en) * | 2018-09-28 | 2019-02-19 | 珠海市君天电子科技有限公司 | A kind of analysis method, device, electronic equipment and storage medium that software is operating abnormally |
CN109783309A (en) * | 2018-12-14 | 2019-05-21 | 平安普惠企业管理有限公司 | The abnormality monitoring method and device of webpage load |
Also Published As
Publication number | Publication date |
---|---|
CN110399275A (en) | 2019-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110399275B (en) | Exception display method and device | |
CN108108297B (en) | Method and device for automatic testing | |
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
CN108647141B (en) | Automatic test method, device, computer readable medium and electronic equipment | |
US11249833B2 (en) | Error detection and remediation using an error signature | |
US20150331779A1 (en) | Framework to accommodate test plan changes without affecting or interrupting test execution | |
US20120159449A1 (en) | Call Stack Inspection For A Thread Of Execution | |
EP2073121A2 (en) | Analyzer and analyzing system, and computer program product | |
CN111309505B (en) | Page exception handling method and device and electronic equipment | |
CN108628739A (en) | A kind of method that Lua scripts are debugged, client, server and debugger | |
CN111078567A (en) | Report generation method, terminal and storage medium of automatic test platform | |
CN111090592A (en) | Automatic testing method of buried point, terminal and readable storage medium | |
CN109783309A (en) | The abnormality monitoring method and device of webpage load | |
CN111506470A (en) | Browser error detection and alarm method, device, equipment and storage medium | |
CN109992511B (en) | Device and method for obtaining code test coverage rate | |
CN111159023A (en) | Test method, test device, electronic equipment and computer readable storage medium | |
CN111061448A (en) | Log information display method and device, electronic equipment and storage medium | |
CN110543429A (en) | Test case debugging method and device and storage medium | |
JP5006824B2 (en) | Test program management system | |
CN111859231A (en) | Webpage monitoring method, equipment, device and computer storage medium | |
CN113849330A (en) | Method, equipment and storage medium for monitoring and analyzing application fault reasons | |
US8635178B2 (en) | Rule-based processing in different layers | |
CN112416735A (en) | Application program detection method and device, terminal equipment and storage medium | |
CN106598770B (en) | Native layer exception reporting processing method and device in Android system | |
CN111124841B (en) | Alarm method and device for abnormal page and computer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |