CN110046002A - A kind of abnormality eliminating method, device, electronic equipment and storage medium - Google Patents

A kind of abnormality eliminating method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110046002A
CN110046002A CN201910218141.3A CN201910218141A CN110046002A CN 110046002 A CN110046002 A CN 110046002A CN 201910218141 A CN201910218141 A CN 201910218141A CN 110046002 A CN110046002 A CN 110046002A
Authority
CN
China
Prior art keywords
error
type
report
content
default
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
CN201910218141.3A
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.)
Shanghai Lazhasi Information Technology Co Ltd
Original Assignee
Shanghai Lazhasi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Lazhasi Information Technology Co Ltd filed Critical Shanghai Lazhasi Information Technology Co Ltd
Priority to CN201910218141.3A priority Critical patent/CN110046002A/en
Publication of CN110046002A publication Critical patent/CN110046002A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present embodiments relate to network technique field, in particular to a kind of abnormality eliminating method, device, electronic equipment and non-volatile memory medium.In the present invention, which includes: the content for obtaining front end and reporting an error;It determines that the type to report an error is default type of error according to the content to report an error, the default corresponding variable of type of error is obtained from the content to report an error;It is preset value by the corresponding variable assignments of default type of error.By being preset value by variable assignments, so that program exception will not be caused to exit because of being NULL by the variable assignments when obtaining the value of the variable, reduce and link up cost and code redundancy, reduce the complexity of code, improve the operational efficiency of code.

Description

A kind of abnormality eliminating method, device, electronic equipment and storage medium
Technical field
The present embodiments relate to network technique field, in particular to a kind of abnormality eliminating method, device, electronic equipment and Storage medium.
Background technique
Currently, rear end passes through the web development technologies of creation interaction network page application during the interaction of front and back end (AJAX) transmit a kind of lightweight data interchange format (JavaScript Object Notation, JSON) character string give before End, front end again becomes JSON character string the object of JSON type, and advantageously obtains each needs by deconstructing assignment Field value.In this process, if attempt to obtain the value of the certain field in an object, also, this object is because of missing And when being assigned null value (NULL), then the exception of default type of error can be triggered, program is exited.
At least there are the following problems in the prior art for inventor's discovery: in the prior art, can provide interface with rear end Point man is held consultation solution, but the point man of front and rear end can be linked up repeatedly for similar problem, increase ditch Logical cost, and the progress of exploitation can be delayed;Judge if being added by front end, when valuation object is NULL, then to the assignment pair As assigning default value, if the level of JSON return value nesting is deeper, the valuation object for needing to judge is more, judgement assignment repeatedly Whether object is NULL, increases the redundancy of code, also makes code more complicated.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of abnormality eliminating method, device, electronic equipment and non-volatile Storage medium lacks for solving dependent variable and is assigned NULL and triggers default type of error, and then leads to program exception The problem of exiting.
In order to solve the above technical problems, embodiments of the present invention provide a kind of abnormality eliminating method, including following step It is rapid: to obtain the content that front end reports an error;Determine that the type to report an error is default type of error according to the content to report an error, from the content to report an error It is middle to obtain the default corresponding variable of type of error;It is preset value by the corresponding variable assignments of default type of error.
Embodiments of the present invention additionally provide a kind of exception handling device, comprising: obtain module, judgment module and assignment Module;Obtain module, the content to report an error for obtaining front end;Judgment module, for determining the class to report an error according to the content to report an error Type is default type of error, and the default corresponding variable of type of error is obtained from the content to report an error;Assignment module, for that will preset The corresponding variable assignments of type of error is preset value.
Embodiments of the present invention additionally provide a kind of electronic equipment, including memory and processor, memory storage meter Calculation machine program, processor execute when running program: obtaining the content that front end reports an error;The type to report an error is determined according to the content to report an error To preset type of error, the default corresponding variable of type of error is obtained from the content to report an error;Default type of error is corresponding Variable assignments is preset value.
Embodiments of the present invention additionally provide a kind of non-volatile memory medium, for storing computer-readable program, The computer-readable program is used to execute abnormality eliminating method as described above for computer.
In terms of existing technologies, the main distinction and its effect are embodiment of the present invention: by by variable assignments For preset value, so that program exception will not be caused to exit because of being NULL by the variable assignments when obtaining the value of the variable, Reduce and link up cost and code redundancy, reduces the complexity of code, improve the operational efficiency of code.
In addition, preset value have can iterative.
In which, by by the corresponding variable assignments of default type of error be with can iterative preset value so that During code executes, the corresponding value of next stage variable of the variable can be got, and then is worth required for obtaining, letter The process for having changed code execution, reduces the complexity of code.
In addition, preset value is empty object or empty array.
In addition, being preset value by the corresponding variable assignments of default type of error, comprising: pass through the wrong interface function of system The corresponding variable assignments of default type of error is preset value by corresponding call back function.
It is corresponding to handle default type of error by the corresponding call back function of wrong interface function of system in which Variable reduce the redundancy of code without being further added by code at each code that there is default type of error, improve The operational efficiency of code.
In addition, obtaining the content that front end reports an error, comprising: obtained by the corresponding call back function of the wrong interface function of system The content to report an error.
In addition, determining that the type to report an error is default type of error according to the content to report an error, obtained from the content to report an error pre- If the corresponding variable of type of error, comprising: through the corresponding call back function of wrong interface function of system, from the content to report an error Obtain the instruction information of the type to report an error;The type that reports an error for determining instruction information instruction is default type of error, out of report an error The default corresponding variable of type of error is obtained in appearance.
In which, by the instruction information of the type to report an error got, to determine that the type that reports an error is default mistake Type, and then corresponding variable is obtained, the process for obtaining the default corresponding variable of type of error is simplified, so that in operating system In the treatment process of rank, it will be able to which variables with default type of error report to rear end, all carry out fault-tolerant processing, subtract The manual judgement to each variable with default type of error is lacked, has reduced the redundancy of code, improve the operation of code Efficiency.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the abnormality eliminating method flow diagram in first embodiment according to the present invention;
Fig. 2 is the abnormality eliminating method flow diagram in second embodiment according to the present invention;
Fig. 3 is the structural schematic diagram of the exception handling device in third embodiment according to the present invention;
Fig. 4 is the structural schematic diagram of the electronic equipment in the 4th embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of abnormality eliminating methods.By being preset value by variable assignments, so that Obtain the variable value when, will not because of by the variable assignments be NULL and cause program exception to exit, reduce communication at Sheet and code redundancy, reduce the complexity of code, improve the operational efficiency of code.
The realization details of the abnormality eliminating method in present embodiment is specifically described below, the following contents is only Facilitate the realization details for understanding this programme, not implements the necessary of this programme.
Fig. 1 show the flow chart of the abnormality eliminating method in present embodiment, be applied to rear end, this method may include as Lower step.
In a step 101, the content that front end reports an error is obtained.
At one in the specific implementation, front end reports error message to rear end, rear end receives the error message.Wherein, preceding End is the module of direct and user interaction in a software systems, for example, the webpage of a website, which runs on personal meter On calculation machine (personal computer, PC) end or mobile terminal, or, the human-computer interaction interface in an executable program;Rear end For controlled in the software systems software output processing module, for example, it is corresponding with the webpage of website, operate in service The background program codeword processing module at device end, or, in an executable program, when user passes through human-computer interaction interface triggering one When a operational order, the background program code of the alignment processing operational order.
In a step 102, determine that the type to report an error is default type of error according to the content to report an error, from the content to report an error Obtain the default corresponding variable of type of error.
At one in the specific implementation, there are many kinds of the error messages that front end reports, the corresponding default mistake of each error message There are many kinds of accidentally type also corresponds to, for example, assignment type error, resource loading error, script file exception etc.;Assignment therein Type error is when carrying out assignment to some variable, which is not consistent with the type of wanted assigned value.Rear end is receiving When the error message that front end reports, judge the error message is which kind of type of error belonged to, however, it is determined that the report of the error message Wrong type is assignment type error, then the corresponding variable of assignment type error is obtained from the content of error information, for example, mistake The content of information is " unforeseen type error: can not find the definition of ' level1 ' ", or, " Uncaught TypeError:Cannot read property'level1'of null ", it is determined that the corresponding name variable of the mistake is " level1 " indicates that variable " level1 " is a null value (NULL), i.e., the variable " level1 " is without corresponding definition.
It in step 103, is preset value by the corresponding variable assignments of default type of error.
Wherein, preset value have can iterative, preset value is empty object or empty array.
It should be noted that title or value that object includes a series of non-sequences be to (pair), an object with start, And to terminate, and each title or value use ": " to be split between, and sky object therein is one not comprising non- The title of sequence or the object of value pair, such as: empty object M { };Array (array) is the set of a value (value), a number Group is terminated with [start, and with], and uses ", " to be split between array member, in sky array representation array therein Void value, for example, sky array N [].
At one in the specific implementation, by the corresponding variable assignments of default type of error be one have can iterative sky it is right As or empty array, when determining a variable is the corresponding variable of default type of error, being one for the variable assignments, have can The empty object of iterative or empty array, indicate that the program code can cross the variable, and the next stage variable for obtaining the variable is corresponding Value, and then obtain required for value.By taking following one section of code as an example:
The value of final variable is obtained using the method for destructing assignment, destructing assignment therein is a Javascript Expression formula, the expression formula allow to will value from array, or, by attribute from being extracted in object in different variables.Specifically Code is accomplished by let { level1:{ level2:{ params1 } } }=res;If in this process, variable " level2 " is judged as default type of error, then the variable " level2 " can be assigned a value of one have can iterative sky it is right As " M { } ", because the sky object " M { } " have can iterative can be direct then in the implementation procedure of value for obtaining final variable The value for obtaining variable " param1 ", that is, directly obtaining value is " 1 ".
In the present embodiment, by being preset value by variable assignments, so that when obtaining the value of the variable, it will not be because of Cause program exception to exit for NULL the variable assignments, reduces and link up cost and code redundancy, reduce answering for code Miscellaneous degree improves the operational efficiency of code.
Second embodiment of the present invention is related to a kind of abnormality eliminating method.Second embodiment is big with first embodiment It causes identical, is in place of the main distinction: by the corresponding call back function of wrong interface function of system, handling default wrong class Type.
Specific process flow is as shown in Fig. 2, in the present embodiment, which is applied to rear end, this method It may include following steps.
In step 201, the content to report an error is obtained by the corresponding call back function of the wrong interface function of system.
At one in the specific implementation, the corresponding call back function acquisition of wrong interface function by windows system reports an error Content, such as: it is right by error event interface (ErrorEvent) function window.onerror () of windows system The call back function answered obtains the content of corresponding error message, wherein includes multiple branches in the call back function, according to not Same type of error executes different code branches, and then obtains the content of corresponding error message.
For example, in call back function, however, it is determined that the type of error is the first type of error, then obtains first type of error The content of corresponding error message;If it is determined that the type of error is the second type of error, then it is corresponding to obtain second type of error Error message content;And so on, it can determine the content of error message corresponding to different type of errors.
In step 202, by the corresponding call back function of wrong interface function of system, report is obtained from the content to report an error The instruction information of wrong type.
At one in the specific implementation, passing through the corresponding call back function of function window.onerror () of windows system, The instruction information of the type to report an error is obtained from the content to report an error, which can be any in default type of error Kind, such as: assignment type error, resource loading error, or, script file exception etc. is obtained according to the different types to report an error Corresponding instruction information determines according to the instruction information and executes corresponding code branch in the call back function.
In step 203, the type that reports an error for determining instruction information instruction is default type of error, is obtained from the content to report an error Take the corresponding variable of default type of error.
At one in the specific implementation, according to the type that reports an error of instruction information instruction, determine that the type of error is default mistake Type gets the default corresponding variable of type of error then from the content for presetting type of error.For example, what this reported an error Content is " type that can not know variable ' level1 ' ", then can determine that the default corresponding variable of type of error is “level1”。
In step 204, by the corresponding call back function of wrong interface function of system, default type of error is corresponding Variable assignments is preset value.
At one in the specific implementation, in the corresponding call back function of function window.onerror () of windows system, Executing type of error is the default corresponding program branch of type of error, this is preset the corresponding variable of type of error " level1 " and is assigned Value be a preset value, the preset value be one have can iterative empty object, or, one have can iterative empty number Group.
For example, doing following processing according to different situations: if the default corresponding variable of type of error is an object Variable, then by this preset the corresponding variable of type of error " level1 " be assigned a value of one it is preset, with can iterative sky it is right As;If the default corresponding variable of type of error is an aray variable, this is preset into the corresponding variable of type of error " level1 " be assigned a value of one it is preset, with can iterative empty array;Otherwise, the process that reports an error for continuing triggering system, after It is continuous to report an error, and the type of error is " default type of error ".
In this embodiment, by the corresponding call back function of wrong interface function of system, to handle default wrong class Type, and by this preset the corresponding variable assignments of type of error be one have can iterative empty array or empty object, in system In the code process process of rank, only need to change input, with variable corresponding to default type of error, so that it may on rear end Report, all variable with default type of error carries out fault-tolerant processing, reduces to each change with default type of error The manual judgement of amount, reduces the redundancy of code, improves the operational efficiency of code.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Third embodiment of the present invention is related to a kind of exception handling device, and it is real that the specific implementation of the device can be found in first The associated description of mode is applied, overlaps will not be repeated.It is worth noting that the specific implementation of the device in present embodiment It can be found in the associated description of second embodiment, but be not limited to both examples above, other unaccounted embodiments also exist Within the protection scope of the present apparatus.
As shown in figure 3, the exception handling device, which specifically includes that, obtains module 301, judgment module 302 and assignment module 303;Module 301 is obtained for obtaining the content that front end reports an error;What judgment module 302 was used to be reported an error according to the content determination to report an error Type is default type of error, and the default corresponding variable of type of error is obtained from the content to report an error;Assignment module 303 is used for will The default corresponding variable assignments of type of error is preset value.
In one example, preset value have can iterative.
In one example, preset value is empty object or empty array.
In one example, module 301 is obtained, is specifically used for: by the corresponding readjustment letter of the wrong interface function of system Number obtains the content to report an error.
In one example, judgment module 302 are specifically used for: passing through the corresponding readjustment letter of the wrong interface function of system Number, obtains the instruction information of the type to report an error from the content to report an error;The type that reports an error for determining instruction information instruction is default mistake Accidentally type obtains the default corresponding variable of type of error from the content to report an error.
In one example, assignment module 303, is specifically used for: passing through the corresponding readjustment letter of the wrong interface function of system The corresponding variable assignments of default type of error is preset value by number.
It is not difficult to find that present embodiment is Installation practice corresponding with first or second embodiment, this embodiment party Formula can work in coordination implementation with first or second embodiment.The relevant technical details mentioned in first or second embodiment exist In present embodiment still effectively, in order to reduce repetition, which is not described herein again.Correspondingly, the correlation mentioned in present embodiment Technical detail is also applicable in first or second embodiment.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, be also possible to a part of a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude innovative part of the invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
In present embodiment, by being preset value by variable assignments, so that when obtaining the value of the variable, it will not be because of general The variable assignments causes program exception to exit for NULL, reduces and links up cost and code redundancy, reduces the complexity of code Degree, improves the operational efficiency of code.
4th embodiment of the invention is related to a kind of electronic equipment, as shown in figure 4, the electronic equipment includes: at least one A processor 401;And the memory 402 with the communication connection of at least one processor 401;Wherein, memory 402 is stored with The instruction that can be executed by least one processor 401, instruction are executed by least one processor 401 to realize: obtaining front end report Wrong content;It determines that the type to report an error is default type of error according to the content to report an error, default mistake is obtained from the content to report an error The accidentally corresponding variable of type;It is preset value by the corresponding variable assignments of default type of error.
Specifically, which includes: one or more processors 401 and memory 402, at one in Fig. 4 For reason device 401.Processor 401, memory 402 can be connected by bus or other modes, to be connected by bus in Fig. 4 It is connected in example.Memory 402 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module.Processor 401 is stored in non-easy in memory 402 by operation The property lost software program, instruction and module are realized above-mentioned thereby executing the various function application and data processing of equipment Abnormality eliminating method.
Memory 402 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory 402 can be with It can also include nonvolatile memory, for example, at least disk memory, a flash memory including high-speed random access memory Device or other non-volatile solid state memory parts.In some embodiments, it includes relative to processing that memory 402 is optional The remotely located memory 402 of device 401, these remote memories 402 can pass through network connection to external equipment.Above-mentioned network Example include but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module is stored in memory 402, when being executed by one or more processor 401, is held Abnormality eliminating method in the above-mentioned any means embodiment of row.
Method provided by the embodiment of the present application can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
5th embodiment of the invention is related to a kind of non-volatile memory medium, for storing computer-readable program, The computer-readable program is used to execute above-mentioned all or part of embodiment of the method for computer.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.
The embodiment of the present application discloses a kind of abnormality eliminating method of A1., which is characterized in that it is applied to headend equipment, it is described Method includes:
Obtain the content that front end reports an error;
It determines that the type to report an error is default type of error according to the content to report an error, is obtained from the content to report an error The corresponding variable of the default type of error;
It is preset value by the corresponding variable assignments of the default type of error.
A2. abnormality eliminating method according to a1, which is characterized in that the preset value has can iterative.
A3. the abnormality eliminating method according to A2, which is characterized in that the preset value is empty object or empty array.
A4. the abnormality eliminating method according to any one of A1 to A3, which is characterized in that by the default wrong class The corresponding variable assignments of type is preset value, comprising:
By the corresponding call back function of wrong interface function of system, by the corresponding variable assignments of the default type of error For preset value.
A5. abnormality eliminating method according to a4, which is characterized in that obtain the content that front end reports an error, comprising:
Pass through the content to report an error described in the corresponding call back function acquisition of the wrong interface function of system.
A6. abnormality eliminating method according to a5, which is characterized in that the class to report an error is determined according to the content to report an error Type is default type of error, and the corresponding variable of the default type of error is obtained from the content to report an error, comprising:
By the corresponding call back function of wrong interface function of system, the finger of the type to report an error is obtained from the content to report an error Show information;
The type that reports an error for determining the instruction information instruction is default type of error, and default mistake is obtained from the content to report an error The accidentally corresponding variable of type.
The embodiment of the present application discloses a kind of exception handling device of B1. characterized by comprising obtains module, judges mould Block and assignment module;
The acquisition module, the content to report an error for obtaining front end;
The judgment module, the content for reporting an error according to determines that the type to report an error is default type of error, from institute It states and obtains the corresponding variable of the default type of error in the content to report an error;
The assignment module, for being preset value by the corresponding variable assignments of the default type of error.
B2. the exception handling device according to B1, which is characterized in that the preset value has can iterative.
B3. the exception handling device according to B2, which is characterized in that the preset value is empty object or empty array.
B4. the exception handling device according to any one of B1 to B3, which is characterized in that by the default wrong class The corresponding variable assignments of type is preset value, comprising:
By the corresponding call back function of wrong interface function of system, by the corresponding variable assignments of the default type of error For preset value.
B5. the exception handling device according to B4, which is characterized in that obtain the content that front end reports an error, comprising:
Pass through the content to report an error described in the corresponding call back function acquisition of the wrong interface function of system.
B6. the exception handling device according to B5, which is characterized in that the class to report an error is determined according to the content to report an error Type is default type of error, and the corresponding variable of the default type of error is obtained from the content to report an error, comprising:
By the corresponding call back function of wrong interface function of system, the finger of the type to report an error is obtained from the content to report an error Show information;
The type that reports an error for determining the instruction information instruction is default type of error, and default mistake is obtained from the content to report an error The accidentally corresponding variable of type.
The embodiment of the present application discloses C1. a kind of electronic equipment, including memory and processor, and memory stores computer Program, processor execute when running program:
Obtain the content that front end reports an error;
It determines that the type to report an error is default type of error according to the content to report an error, is obtained from the content to report an error The corresponding variable of the default type of error;
It is preset value by the corresponding variable assignments of the default type of error.
C2. the electronic equipment according to C1, which is characterized in that the preset value has can iterative.
C3. the electronic equipment according to C2, which is characterized in that the preset value is empty object or empty array.
C4. the electronic equipment according to any one of C1 to C3, which is characterized in that by the default type of error pair The variable assignments answered is preset value, comprising:
By the corresponding call back function of wrong interface function of system, by the corresponding variable assignments of the default type of error For preset value.
C5. the electronic equipment according to C4, which is characterized in that obtain the content that front end reports an error, comprising:
Pass through the content to report an error described in the corresponding call back function acquisition of the wrong interface function of system.
C6. the electronic equipment according to C5, which is characterized in that determine that the type to report an error is according to the content to report an error Default type of error, obtains the corresponding variable of the default type of error from the content to report an error, comprising:
By the corresponding call back function of wrong interface function of system, the finger of the type to report an error is obtained from the content to report an error Show information;
The type that reports an error for determining the instruction information instruction is default type of error, and default mistake is obtained from the content to report an error The accidentally corresponding variable of type.
The embodiment of the present application discloses a kind of non-volatile memory medium of D1., described for storing computer-readable program Computer-readable program is used to execute the abnormality eliminating method as described in any one of A1 to A6 for computer.

Claims (10)

1. a kind of abnormality eliminating method, which is characterized in that be applied to headend equipment, which comprises
Obtain the content that front end reports an error;
Determine that the type to report an error is default type of error according to the content to report an error, from the content to report an error described in acquisition The default corresponding variable of type of error;
It is preset value by the corresponding variable assignments of the default type of error.
2. abnormality eliminating method according to claim 1, which is characterized in that the preset value has can iterative.
3. abnormality eliminating method according to claim 2, which is characterized in that the preset value is empty object or empty array.
4. abnormality eliminating method according to any one of claims 1 to 3, which is characterized in that by the default mistake The corresponding variable assignments of type is preset value, comprising:
It is pre- by the corresponding variable assignments of the default type of error by the corresponding call back function of wrong interface function of system If value.
5. abnormality eliminating method according to claim 4, which is characterized in that obtain the content that front end reports an error, comprising:
Pass through the content to report an error described in the corresponding call back function acquisition of the wrong interface function of system.
6. abnormality eliminating method according to claim 5, which is characterized in that reported an error according to the content determination to report an error Type is default type of error, and the corresponding variable of the default type of error is obtained from the content to report an error, comprising:
By the corresponding call back function of wrong interface function of system, the instruction letter of the type to report an error is obtained from the content to report an error Breath;
The type that reports an error for determining the instruction information instruction is default type of error, and default wrong class is obtained from the content to report an error The corresponding variable of type.
7. a kind of exception handling device characterized by comprising obtain module, judgment module and assignment module;
The acquisition module, the content to report an error for obtaining front end;
The judgment module, the content for reporting an error according to determines that the type to report an error is default type of error, from the report The corresponding variable of the default type of error is obtained in wrong content;
The assignment module, for being preset value by the corresponding variable assignments of the default type of error.
8. a kind of electronic equipment, including memory and processor, memory stores computer program, and processor is held when running program Row:
Obtain the content that front end reports an error;
Determine that the type to report an error is default type of error according to the content to report an error, from the content to report an error described in acquisition The default corresponding variable of type of error;
It is preset value by the corresponding variable assignments of the default type of error.
9. electronic equipment according to claim 8, which is characterized in that determine the type to report an error according to the content to report an error To preset type of error, the corresponding variable of the default type of error is obtained from the content to report an error, comprising:
By the corresponding call back function of wrong interface function of system, the instruction letter of the type to report an error is obtained from the content to report an error Breath;
The type that reports an error for determining the instruction information instruction is default type of error, and default wrong class is obtained from the content to report an error The corresponding variable of type.
10. a kind of non-volatile memory medium, for storing computer-readable program, the computer-readable program is by for based on Calculation machine executes such as abnormality eliminating method described in any one of claims 1 to 6.
CN201910218141.3A 2019-03-21 2019-03-21 A kind of abnormality eliminating method, device, electronic equipment and storage medium Pending CN110046002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910218141.3A CN110046002A (en) 2019-03-21 2019-03-21 A kind of abnormality eliminating method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910218141.3A CN110046002A (en) 2019-03-21 2019-03-21 A kind of abnormality eliminating method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110046002A true CN110046002A (en) 2019-07-23

Family

ID=67274968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910218141.3A Pending CN110046002A (en) 2019-03-21 2019-03-21 A kind of abnormality eliminating method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110046002A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112628089A (en) * 2020-12-30 2021-04-09 上海电气风电集团股份有限公司 Abnormity monitoring method, system, platform, electronic equipment and storage medium
CN113127251A (en) * 2021-04-30 2021-07-16 北京奇艺世纪科技有限公司 Code management method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978529A (en) * 2015-03-10 2015-10-14 腾讯科技(深圳)有限公司 Exception handling method, exception handling system and exception handling server for webpage front end
US20150355993A1 (en) * 2014-06-09 2015-12-10 International Business Machines Corporation Detecting potential class loader problems using the class search path sequence for each class loader
CN106681852A (en) * 2016-12-22 2017-05-17 Ut斯达康(深圳)技术有限公司 Method and device for adjusting browser compatibility

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150355993A1 (en) * 2014-06-09 2015-12-10 International Business Machines Corporation Detecting potential class loader problems using the class search path sequence for each class loader
CN104978529A (en) * 2015-03-10 2015-10-14 腾讯科技(深圳)有限公司 Exception handling method, exception handling system and exception handling server for webpage front end
CN106681852A (en) * 2016-12-22 2017-05-17 Ut斯达康(深圳)技术有限公司 Method and device for adjusting browser compatibility

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
翻墨: "当返回的JSON对象中某字段为null值的处理", 《HTTPS://BLOG.CSDN.NET/QQ_37749185/ARTICLE/DETAILS/81130577》 *
赵先烈: "用window.onerror捕获并上报Js错误的方法", 《HTTPS://WWW.JB51.NET/ARTICLE/78764.HTM》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112628089A (en) * 2020-12-30 2021-04-09 上海电气风电集团股份有限公司 Abnormity monitoring method, system, platform, electronic equipment and storage medium
CN113127251A (en) * 2021-04-30 2021-07-16 北京奇艺世纪科技有限公司 Code management method, device, equipment and storage medium
CN113127251B (en) * 2021-04-30 2023-07-18 北京奇艺世纪科技有限公司 Code management method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Alur et al. Model checking of message sequence charts
Rosu et al. Checking reachability using matching logic
CN104081377B (en) Manage Scripts file dependencies and load time
CN109840083B (en) Webpage component template construction method and device, computer equipment and storage medium
CN110046002A (en) A kind of abnormality eliminating method, device, electronic equipment and storage medium
CN110188135A (en) Document generating method and equipment
CN105205144A (en) Method and system used for data diagnosis and optimization
CN105204917B (en) The method and device of loading configuration file in application program launching
EP2610745A1 (en) Optimizing source code
Krebbers et al. Separation logic for non-local control flow and block scope variables
van der Meyden et al. Algorithmic verification of noninterference properties
CN117112909A (en) Big data recommendation method and big data mining system applied to cloud digital service
Phyo et al. A support tool for the L+ 1-layer divide & conquer approach to leads-to model checking
CN107562428A (en) Rule-based adaptable software quick interface arrangement method and system
Kocsis et al. Dependency injection for programming by optimization
US8407175B2 (en) Method, apparatus and product for SAT solving using templates clauses
Pacharoen et al. Active learning of nondeterministic finite state machines
Nakajima An architecture of dynamically adaptive php-based web applications
CN114757159A (en) Packaging development method and system of multifunctional data table component
CN110399131A (en) Improve method, apparatus, the computer equipment of application program stability
CN107220081A (en) Update method, device and the electronic equipment of screen locking load card
Hu et al. A digital twin approach for enforcing diagnosability in Petri nets
Engelhardt et al. A refinement theory that supports reasoning about knowledge and time for synchronous agents
Ivanov et al. Small Universal Networks of Evolutionary Processors.
CN115034392B (en) Compiling method and device of Rete network and executing method and device of Rete algorithm

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190723

RJ01 Rejection of invention patent application after publication