Client error log collecting method and client error log collecting system
A collection system and client-side technology, which is applied in the field of client-side error log collection and system, can solve problems such as user loss, easy delay of fault handling time, adverse effects, etc., and achieve the effect of improving usability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0024] like figure 1 As shown, the present invention provides a method for collecting client error logs, including:
[0025] Step S1, define a global function run, and place the global function in the outer layer of the JS code running function of the accessed page, the global function uses the try catch syntax error capture method to obtain all JS code errors of the client, and The global function does not throw the error of the JS code in the catch, but places it in a global variable globalError;
[0026] The specific implementation procedure of step S1 can be as follows:
[0027]
[0028]
[0029] Step S2, use a timer to access the global variable globalError when the access page is running, and once an error of the JS code of the client is found in the global variable, use the throw method to throw the error of the JS code to the window.onerror event In this way, the problem of cross-domain script error can be solved;
[0030] The specific implementation procedure...
Embodiment 2
[0043] like figure 2 As shown, the present invention also provides another client error log collection system, including a global function module 1 , a timer module 2 and a window.onerror event module 3 .
[0044] The global function module 1 is used to define a global function, and place the global function in the outer layer of the JS code running function of the access page. The global function uses the try catch syntax error capture method to obtain all the JS codes of the client error, and the global function does not throw the error of the JS code in the catch, but places it in a global variable.
[0045] The timer module 2 is used to access the global variable when the access page is running. Once an error of the JS code of the client is found in the global variable, use the throw method to throw the error of the JS code into the window.onerror event .
[0046]The window.onerror event module 3 is used to obtain all error messages and corresponding client information ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com