CN101763293B - Processing method and device of error message - Google Patents

Processing method and device of error message Download PDF

Info

Publication number
CN101763293B
CN101763293B CN2009102441582A CN200910244158A CN101763293B CN 101763293 B CN101763293 B CN 101763293B CN 2009102441582 A CN2009102441582 A CN 2009102441582A CN 200910244158 A CN200910244158 A CN 200910244158A CN 101763293 B CN101763293 B CN 101763293B
Authority
CN
China
Prior art keywords
error
mismanage
error message
wrong
situation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009102441582A
Other languages
Chinese (zh)
Other versions
CN101763293A (en
Inventor
张传会
刘昱
桓永兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Caxa Technology Co Ltd
Original Assignee
北京数码大方科技有限公司
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 北京数码大方科技有限公司 filed Critical 北京数码大方科技有限公司
Priority to CN2009102441582A priority Critical patent/CN101763293B/en
Publication of CN101763293A publication Critical patent/CN101763293A/en
Application granted granted Critical
Publication of CN101763293B publication Critical patent/CN101763293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a processing method and a device of an error message, wherein the method comprises the steps of: under the condition that an error exists, reading the error message from an error file according to an error code, wherein the error message is configured in the error file; and outputting error contents to an error report according to the error message and a preset function message. Through the invention, the run-time error of a system can be quickly and correctly positioned and represented.

Description

The disposal route of error message and device
Technical field
The present invention relates to field of computer technology, in particular to a kind of disposal route and device of error message.
Background technology
In management system softwares such as PLM, ERP, system makes mistakes in operational process, the developer only is difficult to the reason that orientation problem produces usually according to simple miscue, need build test environment and operate once according to others' mode of operation again, building test environment when system is very big is not the part nothing the matter just.Sometimes the mistake of contingency appears over there in the user, and the user also is unable to explain clearly the rule that problem occurs, and at this moment tester or developer will allow this incorrect restitution be exactly a thing that is difficult to.
At in the correlation technique to the analyzing and processing more complicated of error reason, and then cause long problem of processing time, effective solution is not proposed at present as yet.
Summary of the invention
At in the correlation technique to the analyzing and processing more complicated of error reason, and then cause long problem of processing time and propose the present invention, for this reason, fundamental purpose of the present invention is to provide a kind of disposal route and device of error message, to address the above problem.
To achieve these goals, according to an aspect of the present invention, provide a kind of disposal route of error message.
Disposal route according to error message of the present invention comprises: under the situation that existence makes mistakes, according to error number read error information from wrong file, wherein, dispose error message in wrong file; According to error message and default function information wrong content is exported in the error report.
Preferably, according to error number from wrong file before the read error information, method also comprises: configuration error information in wrong file.
Preferably, before exporting to wrong content in the error report according to error message and default function information, method also comprises: into mismanage object is added in error message; Default function information is added into mismanage object; Wrong content is exported to the error report from the mismanage object.
Preferably, before exporting to wrong content in the error report according to error message and default function information, method also comprises: judge whether to eject the mismanage object interface; In judged result is under the situation that is, wrong content is exported in the error report.
Preferably, be that method also comprises: judge whether error message to be done to return processing under the situation not in judged result; Error message is being done under the situation of returning processing, then continued function information is added into mismanage object.
Preferably, judging whether to eject the mismanage object interface comprises: the order of severity of misjudgment information; Under the situation of the order of severity, then eject the mismanage object interface and report an error more than or equal to predetermined value; Under the situation of the order of severity less than predetermined value, misregistration information.
Preferably, after exporting to wrong content in the error report according to error message and default function information, method also comprises: remove error message and default function information.
To achieve these goals, according to a further aspect in the invention, provide a kind for the treatment of apparatus of error message.
Treating apparatus according to error message of the present invention comprises: read module, be used under the situation that existence makes mistakes, and according to error number read error information from wrong file, wherein, in wrong file, dispose error message; Output module is used for exporting wrong content to error report according to error message and default function information.
Preferably, device also comprises: judge module is used to judge whether to eject the mismanage object interface.
Preferably, device also comprises: remove module, be used to remove error message and default function information.
By the present invention, adopt under the situation that existence makes mistakes, according to error number read error information from wrong file, wherein, in wrong file, dispose error message; According to error message and default function information wrong content is exported in the error report, solved analyzing and processing more complicated to error reason, and then cause long problem of processing time, and then reached the effect of location and playback system run-time error rapidly and accurately.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram according to the disposal route of the error message of the embodiment of the invention;
Fig. 2 is the process flow diagram according to the disposal route of the preferably error message of the embodiment of the invention;
Fig. 3 is the synoptic diagram according to the treating apparatus of the error message of the embodiment of the invention.
Embodiment
Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.Describe the present invention below with reference to the accompanying drawings and in conjunction with the embodiments in detail.
According to embodiments of the invention, provide a kind of disposal route of error message.
Fig. 1 is the process flow diagram according to the disposal route of the error message of the embodiment of the invention.
As shown in Figure 1, this method comprises that following step S102 is to step S104:
Step S102 under the situation that existence makes mistakes, according to error number read error information from wrong file, wherein, disposes error message in wrong file;
Step S104 exports wrong content in the error report to according to error message and default function information.
Preferably, according to error number from wrong file before the read error information, method also comprises: configuration error information in wrong file.
Preferably, before exporting to wrong content in the error report according to error message and default function information, method also comprises: into mismanage object is added in error message; Default function information is added into mismanage object; Wrong content is exported to the error report from the mismanage object.
Preferably, before exporting to wrong content in the error report according to error message and default function information, method also comprises: judge whether to eject the mismanage object interface; In judged result is under the situation that is, wrong content is exported in the error report.
Preferably, be that method also comprises: judge whether error message to be done to return processing under the situation not in judged result; Error message is being done under the situation of returning processing, then continued function information is added into mismanage object.
Preferably, judging whether to eject the mismanage object interface comprises: the order of severity of misjudgment information; Under the situation of the order of severity, then eject the mismanage object interface and report an error more than or equal to predetermined value; Under the situation of the order of severity less than predetermined value, misregistration information.
Preferably, after exporting to wrong content in the error report according to error message and default function information, method also comprises: remove error message and default function information.
Be described in detail below in conjunction with the implementation procedure of example the embodiment of the invention.
Fig. 2 is the process flow diagram according to the disposal route of the preferably error message of the embodiment of the invention.
As shown in Figure 2, this method comprises the steps:
Step S201, configuration error information in the error description file, and the technology of the present invention adopts configuration file to describe mistake.Mistake comprises error number, type, the order of severity, information such as error description.
Preferably, the error description file is as follows, and mistake comprises: error number Error ErrorNo; Mistake title ErrorInfo; Type of error ErrorType; Mistake order of severity ErrorLevel and wrong details ErrorDetail.
<?xml?version=″1.0″encoding=″UTF-8″?>
<ErrorManagerInfo>
<ErrorContent>
" application " ErrorLevel=" seriously " ErrorDetail=" technical papers that need be opened works in this locality and does not exist under the path<Error ErrorNo=" CAXA_PPE_000097 " ErrorInfo=" not finding the technical papers that need be opened under the current operating path " ErrorType=, and possible this technical papers is by newly-built or deleted under the path of this locality in another computing machine.″/>
<Error ErrorNo=" CAXA_PBOM_000083 " ErrorInfo=" failure of output EXCEL file " ErrorType=" seriously " ErrorDetail=" output EXCEL file failure of application " ErrorLevel=" "/〉
</ErrorContent>
</ErrorManagerInfo>
Step S202, the system program operation makes mistakes.
Step S203, mismanage Object Management System mistake, the mismanage object is according to current error number read error information from the error description file.Wherein, the content in the mismanage object is made up of error message and additional information.
In the present invention, describe for example, the function of CAXA_RCODE GetWorkspaceFile () for opening file opened function and reported an error current error message is write among the mismanage object g_cErrorManager.Above-mentioned function representation: locating file, if search less than corresponding file, program is described (for example the loading error code name is the error description of CAXA_PPE_000097) with loading error, and with current function as additional information add advance the mismanage object (code line in for example following the opening file: " if (cFind.FindFile (csFullFileName)==FALSE) " and the error report file in interpolation " cFind.FindFile (csFullFileName)==FALSE " that come in).
Program is returned, when turning back to the RunCommandFun function of CBaseEvent class, eject the dialog box that reports an error, the RunCommandFun of the Error Message File file among the step S206 for example, wherein, RunCommandFun is last function that adds as additional information.The detailed following description of error message ablation process:
CAXA?RCODE GetWorkspaceFile(CCAXAObject
*pCaxaObject,CString&csWorkFiles)
{
CString?csFileName=″″;
pCaxaObject->GetAttrValAsString(″FILE_NAME″,csFileName)
csWorkFiles=g_CAXAWorkFilePath;
CString?csFullFileName=″″;
csFullFileName.Format(″%s\\%s″,csWorkFiles,csFileName);
CFileFind?cFind;
if(cFind.FindFile(csFullFileName)==FALSE)
{
if
(g_cErrorManager.AddNewErrMessageByFile(″CAXA_PPE_000097″)
==1)
{
g_cErrorManager.AddExtErrMessage(g_cErrorManager.GetLast
ErrorNo(),
″PlanFunc″,
″GetWorkspaceFile″,
″cFind.FindFile(csFullFileName)==FALSE″,
csFullFileName);
}
return?CAXA_ERROR;
}
}
Step S204 adds into mismanage object with error message.When program was made mistakes, system added error message in the mismanage object to according to current error number read error information from the error description file.
Step S205, the information of the upper strata call function of the function of makeing mistakes is added into mismanage object as additional information, simultaneously some significant variables value is at that time added into mismanage object in company with function.
Whether step S206 ejects the mismanage object interface after judging this program run.Eject and then change to walk step S207 over to, otherwise, then change step S211 over to.
Preferably, Error Message File is the error report file, is the wrong content of output, comprising Error:1 and Error:2.Program was not done the processing of ejecting error box when system produced Error:1, and program continues operation, just ejected error box when producing wrong Error:2.
Error?Message?File
Error:1
Error number: CAXA_CAPPFoundation_000004
Type of error: system.
Extent of error: serious.
Error message: attribute does not exist in attribute linked-list.
The mistake details: the Property Name that imports into does not exist in the attribute linked-list of object, please the reporting system keeper check whether this attribute exists in data model.
Code word: CCAXAObject
Call function: GetAttrValAsBool (const CString﹠amp; , bool﹠amp; )
Perform statement: if (AttrIsExist (csAttrName)==FAL SE)
Mistake object or contents of object: CN_ISEDIT
Code word: CCAXAObject
Call function: GetAttrValAsInteger (const CString﹠amp; , int﹠amp; )
Perform statement: if (AttrIsExist (csAttrName)==FALSE)
Mistake object or contents of object: CN_APPLICATION_TYPE
Error:2
Error number: CAXA_PPE_000097.
Type of error: use.
Extent of error: serious.
Error message: under current operating path, do not find the technical papers that need be opened.
The mistake details: the technical papers that need be opened works in this locality and does not exist under the path, and possible this technical papers is by newly-built or deleted under the path of this locality in another computing machine.
Code word: PlanFunc
Call function: GetWorkspaceFile
Perform statement: cFind.FindFile (csFullFileName)==FALSE
Mistake object or contents of object: C: CAXA CAXAV5 PPDoc Work
Code word: PlanFunc
Call function: OpenPlanfile
Perform statement: GetWorkspaceFile (pCaxaObject, sWorkFiles)!=CAXA_SUCCESS
Mistake object or contents of object:
Code word: CBaseEvent
Call function: RunCommandFun
Perform statement: rc==CAXA_ERROR
Mistake object or contents of object:
Step S207 judges whether the output error content.If output error content then change step S208 over to, otherwise, then change step S209 over to.
Step S208, the wrong content in the mismanage object outputs in the error report.Wherein, the mistake that some is not serious, system do not need to report an error, but system can the call error management object note.When program reports an error, during the output error content, not serious before mistake also can be along with outputing in the error report.
Step S209, mistake content session frame is closed.
Step S210 empties the wrong content in the mismanage object.
Step S211, whether program has been done mistake and has been returned processing.If done and returned processing then change step S212 over to, otherwise, then change step S213 over to.
Step S212 turns back to the upper strata call function, and call function finishes back execution in step S205.
Step S213, current mistake is not serious, and system does not need to report an error, and program continues execution in step S202.
Preferably, the function that this method record is made mistakes is to one of application operating complete function calling relationship, writes down significant variable value during each function operation in call relation.
As can be seen from the above description, error report misregistration information of the present invention and additional information are operated to top layer from the function of makeing mistakes, and represent a complete function calling relationship; Error report has write down the inessential error message of system before reporting an error, and has write down the value of report an error function and upper strata call function and significant variable.With format structure clearly, the wrong content in the mismanage object is outputed in the error report when system reports an error, present error message detailed in system's operational process.The developer can be convenient to analyze the reason of makeing mistakes by the error message output file than more comprehensive understanding system run-time error situation.
According to embodiments of the invention, provide a kind for the treatment of apparatus of error message.
Fig. 3 is the synoptic diagram according to the treating apparatus of the error message of the embodiment of the invention.
As shown in Figure 3, this device comprises: read module 301 and output module 302.
Wherein, read module 30l is used under the situation that existence makes mistakes, and according to error number read error information from wrong file, wherein, disposes error message in wrong file; Output module 302 is used for exporting wrong content to error report according to error message and default function information.
Preferably, this device also comprises: judge module 303.
Wherein, judge module 303 is used to judge whether to eject the mismanage object interface.
Preferably, this device also comprises: remove module 304.
Wherein, remove module 304, be used to remove error message and default function information.
Need to prove, can in computer system, carry out in the step shown in the process flow diagram of accompanying drawing such as a set of computer-executable instructions, and, though there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. the disposal route of an error message is characterized in that, comprising:
Under the situation that existence makes mistakes,, wherein, in described wrong file, dispose described error message according to error number read error information from wrong file;
Into mismanage object is added in described error message;
The information of the upper strata call function of the function of makeing mistakes is added into described mismanage object;
Judge whether to eject the mismanage object interface;
In judged result is under the situation that is, wrong content is exported to the error report from described mismanage object.
2. method according to claim 1 is characterized in that, according to error number from wrong file before the read error information, described method also comprises:
The described error message of configuration in described wrong file.
3. method according to claim 1 is characterized in that, is that described method also comprises under the situation not in judged result:
Judge whether described error message to be done to return processing;
Described error message is being done under the situation of returning processing, then returned described upper strata call function, continuing function information is added into described mismanage object.
4. method according to claim 1 is characterized in that, judges whether to eject the mismanage object interface and comprises:
Judge the order of severity of described error message;
Under the situation of the described order of severity, then eject the mismanage object interface and report an error more than or equal to predetermined value;
Under the situation of the described order of severity, write down described error message less than described predetermined value.
5. according to each described method in the claim 1 to 4, it is characterized in that, with described wrong content after described mismanage object exports to the described error report, described method also comprises:
Remove the wrong content in the described mismanage object.
6. the treating apparatus of an error message is characterized in that, comprising:
Read module is used under the situation that existence makes mistakes, and according to error number read error information from wrong file, wherein, disposes described error message in described wrong file;
First adds module, is used for into mismanage object is added in described error message;
Second adds module, is used for the information of the upper strata call function of the function of makeing mistakes is added into described mismanage object;
Judge module is used to judge whether to eject the mismanage object interface;
Output module, being used in judged result is under the situation that is, wrong content is exported to the error report from described mismanage object.
7. device according to claim 6 is characterized in that, described device also comprises:
Remove module, be used for removing the wrong content of described mismanage object.
CN2009102441582A 2009-12-30 2009-12-30 Processing method and device of error message Active CN101763293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102441582A CN101763293B (en) 2009-12-30 2009-12-30 Processing method and device of error message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102441582A CN101763293B (en) 2009-12-30 2009-12-30 Processing method and device of error message

Publications (2)

Publication Number Publication Date
CN101763293A CN101763293A (en) 2010-06-30
CN101763293B true CN101763293B (en) 2011-12-14

Family

ID=42494462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102441582A Active CN101763293B (en) 2009-12-30 2009-12-30 Processing method and device of error message

Country Status (1)

Country Link
CN (1) CN101763293B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523326B (en) * 2011-12-12 2015-03-18 广东欧珀移动通信有限公司 Method for voice broadcasting initial quality survey
CN104571027B (en) * 2014-12-22 2017-11-10 惠州市亿能电子有限公司 A kind of BMS host computers data record and its data scene restoring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997997A (en) * 2004-07-22 2007-07-11 巴瑞弗鲁特有限公司 Improved user interface
US7379846B1 (en) * 2004-06-29 2008-05-27 Sun Microsystems, Inc. System and method for automated problem diagnosis
CN101211309A (en) * 2006-12-29 2008-07-02 中兴通讯股份有限公司 Embedded system progress abnormal tracking position-finding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379846B1 (en) * 2004-06-29 2008-05-27 Sun Microsystems, Inc. System and method for automated problem diagnosis
CN1997997A (en) * 2004-07-22 2007-07-11 巴瑞弗鲁特有限公司 Improved user interface
CN101211309A (en) * 2006-12-29 2008-07-02 中兴通讯股份有限公司 Embedded system progress abnormal tracking position-finding method

Also Published As

Publication number Publication date
CN101763293A (en) 2010-06-30

Similar Documents

Publication Publication Date Title
del Mar Gallardo et al. Debugging UML designs with model checking
CN106295346B (en) Application vulnerability detection method and device and computing equipment
US20230050691A1 (en) System for detecting malicious programmable logic controller code
CN115080406A (en) Code log generation method, device, equipment and storage medium
CN111581090A (en) Automatic test case generation method and system based on NLP and RF framework
Atig et al. On the reachability analysis of acyclic networks of pushdown systems
CN110287700B (en) iOS application security analysis method and device
CN101763293B (en) Processing method and device of error message
CN109086186B (en) Log detection method and device
Bogdanov Automated testing of Harel's statecharts
CN113158189A (en) Method, device, equipment and medium for generating malicious software analysis report
CN110765008B (en) Data processing method and device
CN102937934A (en) Capturing telemetry data through a dynamic language engine
CN111258562A (en) Java code quality inspection method, device, equipment and storage medium
CN113805861B (en) Code generation method based on machine learning, code editing system and storage medium
CN105912431A (en) Reboot testing method of server, server, control device and system
CN113238748B (en) Direct current control and protection program page modification and verification method, device, terminal and medium
CN111274143B (en) Buried point test method, buried point test device, buried point test equipment and storage medium
CN113392016A (en) Protocol generation method, device, equipment and medium for processing program abnormal condition
König Analysis and verification of systems with dynamically evolving structure
CN113037521B (en) Method for identifying state of communication equipment, communication system and storage medium
CN110244954A (en) A kind of Compilation Method and equipment of application program
Duarte et al. Extraction of probabilistic behaviour models based on contexts
CN109800099A (en) A kind of restoring method, storage medium and the terminal device of user&#39;s operation behavior
CN112581140B (en) Intelligent contract verification method and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: CAXA TECHNOLOGY CO., LTD.

Free format text: FORMER NAME: BEIJING DIGITAL DAFANG TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 100080, Room 802, satellite building, No. 63, Zhichun Road, Beijing, Haidian District

Patentee after: Beijing CAXA Technology Co., Ltd.

Address before: 100080, Room 802, satellite building, No. 63, Zhichun Road, Beijing, Haidian District

Patentee before: Beijing Digital Dafang Technology Co., Ltd.