CN115016968A - Exception handling method, device, equipment and medium - Google Patents

Exception handling method, device, equipment and medium Download PDF

Info

Publication number
CN115016968A
CN115016968A CN202210621492.0A CN202210621492A CN115016968A CN 115016968 A CN115016968 A CN 115016968A CN 202210621492 A CN202210621492 A CN 202210621492A CN 115016968 A CN115016968 A CN 115016968A
Authority
CN
China
Prior art keywords
log file
software package
file
code
exception handling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210621492.0A
Other languages
Chinese (zh)
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202210621492.0A priority Critical patent/CN115016968A/en
Publication of CN115016968A publication Critical patent/CN115016968A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0736Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function
    • G06F11/0739Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function in a data processing system embedded in automotive or aircraft systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an exception handling method, an exception handling device, exception handling equipment and an exception handling medium, which are applied to a server, relate to the technical field of computers and comprise the following steps: acquiring an abnormal log file sent by target equipment; processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code; and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal. In the application, the server processes the abnormal log file sent by the target device by using the preset stack analysis tool, can quickly analyze the corresponding code error position and obtain the first log file, so that the target terminal can quickly locate the error code according to the first log file and modify the error code. Therefore, the problem of program crash caused by code defects can be quickly solved.

Description

Exception handling method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for exception handling.
Background
At present, when a user diagnoses a vehicle by using diagnostic software, and the diagnostic software cannot be normally used due to abnormality, the user actively collects log files of diagnostic data and feeds the log files back to developers, and the user needs to participate in the process and actively feeds back the problem, so that the user experience is poor. And the developer simulates the diagnosis process according to the log file of the diagnosis data, positions the error position of the running code after the program is crashed and then modifies the code to solve the problem. Because the developer collects the log files of the diagnostic data, the whole diagnostic process needs to be simulated according to the log files, however, for the accidental crash program, a lot of time is needed to locate the wrong position of the code, and the time cost is high.
In summary, how to quickly locate the code error position to save time and cost is a problem to be solved.
Disclosure of Invention
In view of the above, an object of the present invention is to provide an exception handling method, apparatus, device and medium, which can quickly locate a code error position to save time and cost. The specific scheme is as follows:
in a first aspect, the present application discloses an exception handling method, applied to a server, including:
acquiring an abnormal log file sent by target equipment;
processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code;
and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
Optionally, the processing the exception log file by using a preset stack analysis tool to obtain a first log file for characterizing a location of a code error includes:
and processing the abnormal log file by utilizing an ndk-stack tool to obtain a first log file for representing the error position of the code.
Optionally, the obtaining the abnormal log file sent by the target device includes:
acquiring a second log file which is sent by target equipment and comprises an abnormal log file and current software package information; the current software package information comprises a software package name, a software package version number, a software package language and a connector serial number.
Optionally, the sending the first log file to a target terminal includes:
determining a target terminal corresponding to the current software package information;
and sending the abnormal log file and the first log file to the target terminal.
Optionally, the exception handling method includes:
and establishing a preset matching relationship between each software package and the symbolic version file in the shared library in advance according to the software package name, the software package version number and the software package language of the software package.
Optionally, the processing the exception log file by using a preset stack analysis tool to obtain a first log file for characterizing a location of a code error includes:
extracting the abnormal log file and the current software package information from the second log file, and putting the abnormal log file into a preset directory;
acquiring a target symbol version file corresponding to the current software package information based on the preset matching relation, and putting the target symbol version file into the preset directory;
and processing the abnormal log file in the preset directory by utilizing a preset stack analysis tool based on the target symbol version file to obtain a first log file for representing the error position of the code.
Optionally, the processing the exception log file by using a preset stack analysis tool to obtain a first log file for characterizing a location of a code error includes:
and processing the abnormal log file by using a preset stack analysis tool to obtain a first log file comprising an error source code file and a corresponding code error line number.
In a second aspect, the present application discloses an exception handling apparatus, applied to a server, including:
the file acquisition module is used for acquiring an abnormal log file sent by target equipment;
the file processing module is used for processing the abnormal log file by utilizing a preset stack analysis tool to obtain a first log file for representing the error position of the code;
and the exception handling module is used for sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the exception handling method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the steps of the exception handling method disclosed in the foregoing when executed by a processor.
Therefore, the exception handling method is applied to the server, and is used for obtaining the exception log file sent by the target equipment; processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code; and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal. Therefore, after the server acquires the abnormal log file sent by the target device, the server processes the abnormal log file by using a preset stack analysis tool so as to quickly analyze the corresponding code error position and acquire a corresponding first log file, so that the target terminal can quickly locate the error code according to the first log file and modify the error code. Therefore, the problem of program crash caused by code defects can be solved quickly, and time cost is saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method of exception handling as disclosed herein;
FIG. 2 is a flow chart of a particular exception handling method disclosed herein;
FIG. 3 is a flow chart of a particular exception handling method disclosed herein;
FIG. 4 is a schematic diagram of an exception handling apparatus according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, when a user diagnoses a vehicle by using diagnostic software, and the diagnostic software cannot be normally used due to abnormality, the user actively collects log files of diagnostic data and feeds the log files back to developers, and the user needs to participate in the process and actively feeds back the problem, so that the user experience is poor. And the developer simulates the diagnosis process according to the log file of the diagnosis data, positions the error position of the running code after the program is crashed and then modifies the code to solve the problem. Because the developer collects the log files of the diagnostic data, the whole diagnostic process needs to be simulated according to the log files, however, for the accidental crash program, a lot of time is needed to locate the wrong position of the code, and the time cost is high. Therefore, the embodiment of the application discloses an exception handling method, an exception handling device, exception handling equipment and an exception handling medium, which can be used for quickly positioning a code error position so as to save time and cost.
Referring to fig. 1, an embodiment of the present application discloses an exception handling method, which is applied to a server, and includes:
step S11: and acquiring an abnormal log file sent by the target equipment.
In this embodiment, taking a vehicle diagnostic process as an example, the target device may specifically be a diagnostic device of a vehicle. Specifically, when a user has a jni (Java Native Interface, that is, Java local Interface, which can ensure that codes are conveniently transplanted on different platforms by using a Java local Interface writing program) abnormality during a vehicle diagnosis process, the diagnostic device automatically collects an abnormality log file of diagnostic data and uploads the abnormality log file to the server, so that the server obtains the abnormality log file sent by the diagnostic device. Because the diagnosis equipment automatically collects the abnormal log files, the problem of active feedback of a user is not needed, and the user experience can be further improved.
Step S12: and processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code.
In this embodiment, after the server obtains the abnormal log file, the server processes the abnormal log file by using a preset stack analysis tool to obtain a first log file, where the first log file is used to represent a code error location. That is, through the processing of presetting stack analysis tool, can obtain the code error location fast, compare and need the developer to simulate whole diagnosis flow according to unusual log file among the prior art to just fix a position the code error location after the program breakdown, can save a large amount of time cost.
Step S13: and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
In this embodiment, the server may send the first log file to the target terminal, where the target terminal may be a mailbox of a development responsible person, so that the development responsible person may locate a code error position according to the first log file to solve an abnormal crash problem, for example, modify a source code file and release a new version of a program file.
Therefore, the exception handling method is applied to the server, and is used for obtaining the exception log file sent by the target equipment; processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code; and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal. Therefore, after the server acquires the abnormal log file sent by the target device, the server processes the abnormal log file by using a preset stack analysis tool so as to quickly analyze the corresponding code error position and acquire a corresponding first log file, so that the target terminal can quickly locate the error code according to the first log file and modify the error code. Therefore, the problem of program crash caused by code defects can be quickly solved, and the time cost is saved.
Referring to fig. 2, the embodiment of the present application discloses a specific exception handling method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S21: acquiring a second log file which is sent by target equipment and comprises an abnormal log file and current software package information; the current software package information comprises a software package name, a software package version number, a software package language and a connector serial number.
In this embodiment, the target device not only needs to automatically collect the abnormal log file, but also needs to collect the information of the running current software package; wherein the current software package information may include but is not limited to necessary information such as a software package name, a software package version number, a software package language, a connector serial number, etc., and writes the exception log file and the current software package information together into a second log file. And then the server acquires a second log file which is sent by the target equipment and comprises the abnormal log file and the current software package information.
Step S22: extracting the abnormal log file and the current software package information from the second log file, and putting the abnormal log file into a preset directory; and acquiring a target symbol version file corresponding to the current software package information based on a preset matching relation, and putting the target symbol version file into the preset directory.
In this embodiment, the server needs to extract an abnormal log file from the second log file, name the abnormal log file as log.txt, and place the log file into a preset directory, where the preset target may be a temporarily created directory; the server also needs to extract the current software package information, namely the name of the software package, the version number of the software package, the language of the software package, the connector serial number and the like, from the second log file, acquire a target symbol version file corresponding to the current software package information according to a preset matching relationship, and then put the target symbol version file into a temporarily created directory.
It should be noted that the exception handling method in the embodiment of the present application further includes: and establishing a preset matching relationship between each software package and the symbolic version file in the shared library in advance according to the software package name, the software package version number and the software package language of the software package. That is, the server establishes a preset matching relationship between each software package and the symbol version file in the shared library in advance according to the three information of the software package name, the software package version number and the software package language, so that the symbol version file of the shared library corresponding to the software package can be determined by the software package name, the software package version number and the software package language of the currently running software package. It will be appreciated that a software package, if multiple versions or languages are available, may correspond to multiple symbolic version files in a shared library. And the symbolic version of the shared library is used for converting the address corresponding to the abnormal log file into a source file and a file corresponding to the row number when a preset stack analysis tool is subsequently utilized.
Step S23: and processing the abnormal log file in the preset directory by utilizing a preset stack analysis tool based on the target symbol version file to obtain a first log file for representing the error position of the code.
In this embodiment, based on the target symbol version file and by using the preset stack analysis tool to process the abnormal log file stored in the preset directory, the first log file for representing the error position of the code can be obtained.
Step S24: and determining a target terminal corresponding to the current software package information, and sending the abnormal log file and the first log file to the target terminal so as to modify a corresponding code through the target terminal.
In this embodiment, different software packages all have corresponding development responsible persons, and then the development responsible person corresponding to the current software package can be determined according to the current software package information. Furthermore, the abnormal log file can be sent to the target terminal, and the purpose of sending the abnormal log file is to facilitate further comparison and verification by development responsible personnel, so that the situation that errors occur in the processing process by utilizing a preset stack analysis tool is avoided. And the abnormal log file and the first log file can be sent to a mailbox of a responsible person of the corresponding software package in a mail mode to remind the responsible person of processing the corresponding code file.
Therefore, when the abnormal log file sent by the target device is obtained, the method and the device further comprise current software package information, wherein the current software package information comprises a software package name, a software package version number, a software package language and a connector serial number. The server can obtain a corresponding target symbol version file according to the current software package information, so that when a preset stack analysis tool is subsequently utilized, an address corresponding to the abnormal log file is converted into a source file and a file corresponding to the line number through the symbol version file; in addition, the server can also determine a corresponding target terminal according to the current software package information, so that the corresponding code can be modified after the abnormal log file and the first log file are acquired through the target terminal.
Referring to fig. 3, the embodiment of the present application discloses a specific exception handling method, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S31: and acquiring an abnormal log file sent by the target equipment.
Step S32: and processing the exception log file by utilizing an ndk-stack tool to obtain a first log file comprising an error source code file and a corresponding code error line number.
In this embodiment, the predetermined stack analysis tool may be an ndk-stack tool. And the ndk-stack is a tool for 'translating' the specific source file and line number corresponding to the Crash stack information, wherein the 'translating' is to convert the corresponding address into the source file and the corresponding line number. In addition, the addr2line tool may also be used, but the addr2line needs to extract some memory addresses of the error log and then analyze the memory addresses to a specific error file line, and the process is not convenient to use ndk-stack, so the ndk-stack tool is adopted in this embodiment.
In this embodiment, the ndk-stack is used to analyze the abnormal log file to obtain an error source code file and a corresponding code error line number, and the error source code file and the corresponding code error line number are written into a first log file, which is named trace. For example, the command behavior NDK/NDK-stack-sym temporary directory path-dump trace.
Step S33: and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
For more specific processing procedures of the steps S31 and S33, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
As can be seen, the default stack analysis tool used in the examples of the present application is the ndk-stack tool. By using the ndk-stack tool, the error source code file and the corresponding code error line number can be quickly analyzed and obtained on the server, so that the problem of program crash caused by code defects can be quickly solved, and the time cost is saved.
Referring to fig. 4, an embodiment of the present application discloses an exception handling apparatus, which is applied to a server, and includes:
the file acquisition module 11 is configured to acquire an exception log file sent by a target device;
the file processing module 12 is configured to process the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing a code error position;
and the exception handling module 13 is configured to send the first log file to a target terminal, so that the target terminal modifies a corresponding code.
Therefore, the exception handling method is applied to the server, and is used for obtaining the exception log file sent by the target equipment; processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code; and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal. Therefore, after the server acquires the abnormal log file sent by the target device, the server processes the abnormal log file by using a preset stack analysis tool so as to quickly analyze the corresponding code error position and acquire a corresponding first log file, so that the target terminal can quickly locate the error code according to the first log file and modify the error code. Therefore, the problem of program crash caused by code defects can be solved quickly, and time cost is saved.
In some specific embodiments, the file processing module 12 may specifically include:
and the first processing unit is used for processing the abnormal log file by utilizing an ndk-stack tool to obtain a first log file for representing the error position of the code.
In some specific embodiments, the file obtaining module 11 may specifically include:
the second log file acquisition unit is used for acquiring a second log file which is sent by the target equipment and comprises an abnormal log file and current software package information; the current software package information comprises a software package name, a software package version number, a software package language and a connector serial number.
In some specific embodiments, the exception handling module 13 may specifically include:
the target terminal determining unit is used for determining a target terminal corresponding to the current software package information;
and the file sending unit is used for sending the abnormal log file and the first log file to the target terminal.
In some specific embodiments, the exception handling apparatus may specifically include:
and the matching relationship establishing unit is used for establishing a preset matching relationship between each software package and the symbolic version file in the shared library in advance according to the software package name, the software package version number and the software package language of the software package.
In some specific embodiments, the file processing module 12 may specifically include:
the file extraction unit is used for extracting the abnormal log file and the current software package information from the second log file and putting the abnormal log file into a preset directory;
a symbol version obtaining unit, configured to obtain a target symbol version file corresponding to the current software package information based on the preset matching relationship, and place the target symbol version file in the preset directory;
and the second processing unit is used for processing the abnormal log file in the preset directory by utilizing a preset stack analysis tool based on the target symbol version file to obtain a first log file for representing the error position of the code.
In some specific embodiments, the file processing module 12 may specifically include:
and the third processing unit is used for processing the abnormal log file by using a preset stack analysis tool to obtain a first log file comprising an error source code file and a corresponding code error line number.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the exception handling method performed by the electronic device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the mass data 223 in the memory 22 by the processor 21, which may be Windows, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the exception handling method performed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the method steps executed in the exception handling process disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing detailed description of the exception handling method, apparatus, device and storage medium provided by the present invention has been presented, and the present application has been described with specific examples to explain the principles and embodiments of the present invention, and the description of the foregoing examples is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An exception handling method applied to a server includes:
acquiring an abnormal log file sent by target equipment;
processing the abnormal log file by using a preset stack analysis tool to obtain a first log file for representing the error position of the code;
and sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
2. The exception handling method according to claim 1, wherein said processing said exception log file with a predetermined stack analysis tool to obtain a first log file for characterizing a code error location comprises:
and processing the abnormal log file by utilizing an ndk-stack tool to obtain a first log file for representing the error position of the code.
3. The exception handling method according to claim 1, wherein said obtaining an exception log file sent by a target device includes:
acquiring a second log file which is sent by target equipment and comprises an abnormal log file and current software package information; the current software package information comprises a software package name, a software package version number, a software package language and a connector serial number.
4. The exception handling method according to claim 3, wherein said sending the first log file to a target terminal comprises:
determining a target terminal corresponding to the current software package information;
and sending the abnormal log file and the first log file to the target terminal.
5. The exception handling method according to claim 3, further comprising:
and establishing a preset matching relationship between each software package and the symbolic version file in the shared library in advance according to the software package name, the software package version number and the software package language of the software package.
6. The exception handling method according to claim 5, wherein said processing said exception log file using a predetermined stack analysis tool to obtain a first log file for characterizing a location of a code error comprises:
extracting the abnormal log file and the current software package information from the second log file, and putting the abnormal log file into a preset directory;
acquiring a target symbol version file corresponding to the current software package information based on the preset matching relation, and putting the target symbol version file into the preset directory;
and processing the abnormal log file in the preset directory by utilizing a preset stack analysis tool based on the target symbol version file to obtain a first log file for representing the error position of the code.
7. The exception handling method according to any one of claims 1 to 6, wherein said processing said exception log file with a predetermined stack analysis tool to obtain a first log file for characterizing a code error location comprises:
and processing the exception log file by using a preset stack analysis tool to obtain a first log file comprising an error source code file and a corresponding code error line number.
8. An exception handling apparatus, applied to a server, includes:
the file acquisition module is used for acquiring an abnormal log file sent by target equipment;
the file processing module is used for processing the abnormal log file by utilizing a preset stack analysis tool to obtain a first log file for representing the error position of the code;
and the exception handling module is used for sending the first log file to a target terminal so as to modify the corresponding code through the target terminal.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the exception handling method of any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the steps of the exception handling method of any one of claims 1 to 7.
CN202210621492.0A 2022-06-02 2022-06-02 Exception handling method, device, equipment and medium Pending CN115016968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210621492.0A CN115016968A (en) 2022-06-02 2022-06-02 Exception handling method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210621492.0A CN115016968A (en) 2022-06-02 2022-06-02 Exception handling method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115016968A true CN115016968A (en) 2022-09-06

Family

ID=83072636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210621492.0A Pending CN115016968A (en) 2022-06-02 2022-06-02 Exception handling method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115016968A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909800A (en) * 2023-09-13 2023-10-20 深圳市智慧城市科技发展集团有限公司 Method and device for locating crash information and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909800A (en) * 2023-09-13 2023-10-20 深圳市智慧城市科技发展集团有限公司 Method and device for locating crash information and storage medium
CN116909800B (en) * 2023-09-13 2024-03-08 深圳市智慧城市科技发展集团有限公司 Method and device for locating crash information and storage medium

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN107506300B (en) User interface testing method, device, server and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN109101228B (en) Application program execution method and device
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN108874441B (en) Board card configuration method, device, server and storage medium
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN112100078A (en) Method, device and equipment for generating interface test case
CN115016968A (en) Exception handling method, device, equipment and medium
CN109828759B (en) Code compiling method, device, computer device and storage medium
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN112181822A (en) Test method and test method for starting time consumption of application program
CN109474822B (en) Android television multi-language automatic testing method and device
CN111506305A (en) Tool kit generation method and device, computer equipment and readable storage medium
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN114610446A (en) Method, device and system for automatically injecting probe
CN111338956A (en) Automatic pressure measurement method, device, equipment and storage medium
CN111176718A (en) Script online method and device, storage medium and electronic equipment
CN113778773B (en) SIM card simulation method and device and electronic equipment
CN113722236B (en) Game debugging method, device, equipment and storage medium
CN114385384B (en) Application programming interface calling method and related equipment
CN113656296A (en) Code testing method and device, electronic equipment and storage medium
CN113849186A (en) Script file processing method and device, storage medium and electronic equipment

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