CN100424653C - Method for processing error of java script language program used for distribution type internet network - Google Patents
Method for processing error of java script language program used for distribution type internet network Download PDFInfo
- Publication number
- CN100424653C CN100424653C CNB03100699XA CN03100699A CN100424653C CN 100424653 C CN100424653 C CN 100424653C CN B03100699X A CNB03100699X A CN B03100699XA CN 03100699 A CN03100699 A CN 03100699A CN 100424653 C CN100424653 C CN 100424653C
- Authority
- CN
- China
- Prior art keywords
- client
- server end
- subroutine
- program
- master routine
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The present invention relates to a method for processing a Java scripting language error for a distribution type internet network. The present invention respectively provides composition formats of an error processing program and an execution program for a client end, a server end and a transmission communication protocol. When the client end, the server end and a remote call program are in failure in the process of executing, the corresponding error processing programs all can cause the program function and the file name which are in failure to be transferred to a client end main program error processing stack in the mode of extending and marking language format strings at a reverse program call sequence.
Description
Technical field
The present invention relates to a kind of java script language program error handling method that is applied to distributed network, be meant especially and a kind ofly in client, server end and transport communication protocol program, utilize predetermined form to write its error handler code separately, make when client-side program and server make a mistake, file name and the file function that makes a mistake can be extended the java script language program error handling method of the form output of markup language character string by one.
Background technology
The java script language has been applied in the current distributed network internet in a large number, and is relatively low although it because have cross-platform characteristic, makes on the whole development difficulty, and the fault processing mechanism that itself provided is quite weak.Built-in wrong trial of existing java script language and the mechanism of seizure grammer (try, throw, and catch) as fault processing.When being arranged in the wrong calling of attempting block and making a mistake, i.e. the running of shut down procedure, and skip in the fault processing mechanism and handle.Yet above-mentioned function but only is limited on the at present performed file, thus, when remote server generation program error, file name that it makes a mistake and corresponding function also can't allow program developer know smoothly, and unavoidable ground will increase the difficulty of program debugging.
See also Fig. 1, Fig. 1 is the synoptic diagram of a distributed network internet 10.World-wide web is minimum to be included a client 12, a server end 13 and a transport communication protocol 15 and is used for ditch client terminal 12 and server end 13.When the data in the client 12 desire access databases 17, but client 12 call server ends 13 carry out access by 13 pairs of databases of server end 17.The data that server end 12 and client are 13 is linked up, and all is to reach by transport communication protocol 15.For instance, the user who is positioned at client 12 may be positioned at the A position, when it uses a browser (browser) to desire to browse the website data of server (end) 13 of B position, must prior to the input of the command line on the browser one meet the control command of transport communication protocol 15 and web site (as
Http:// XYZ.com), the transport communication protocol 15 in this example promptly is that (hyper text transmission protocol is on basis HTTP) in HTML (Hypertext Markup Language) for framework.Server end 13 is receiving when coming from the requiring of client 12, just can be to database 17 access data (can be a web page contents in this example), and this web page contents just can be presented on client 12 users' the display screen.Again, suppose user's desire by file transfer protocol (FTP) (file transmissionprotocol, when FTP) remote data base being carried out data access, its equally can in the command line of browser key in as
Ftp: //ABC.orgOrder, on just carrying out thus/action of downloading to the data on the ABC.org address.
Yet, send request by client 12 to server end 13 above-mentioned, and transfer to server end 13 and handle so that any expection mistake in addition may take place in the process of database 17 access data.Java script language does not now provide complete error stack to repay for the program developer debug and for the user.
Therefore, as from the foregoing, above-mentioned prior art on reality is used, obviously has inconvenience and shortcoming to exist, and can be improved.
So the inventor can improve thoughts on above-mentioned shortcoming, concentrate on studies and cooperate theoretical utilization, propose a kind of reasonable in design and effectively improve the present invention of above-mentioned shortcoming finally.
Summary of the invention
Fundamental purpose of the present invention is to utilize the mistake of java script language program itself to attempt and the seizure grammer, cooperation is with the file name and the function that make a mistake, utilize one to extend of the opposite direction passback of markup language character string, make program developer be collected complete mistake by master routine calling subroutine.Via method provided by the present invention, be applied under the environment of distributed network internet framework now, and even, can both collect and be passed to client master routine error handler with the form of extending tag format language format character string no matter make the mistake that occurs in client or server end remote call-in program.Therefore, to more clearly understand be where mistake has taken place to program developer actually.
The invention provides a kind of java script language program error handling method that is applied to the distributed network internet.The distributed network internet includes: a client, a server end and a database, client includes at least one master routine, each master routine includes at least one subroutine, server end includes at least one master routine equally, each server end master routine includes at least one subroutine, and a remote call-in program.Client and server end are to get in touch each other by a transport communication protocol.Java script linguistic errors disposal route of the present invention includes: provide the client master routine one error handler, when execution client master routine makes a mistake, calling customer end master routine error handler is to produce a corresponding extension markup language character string; Error handler corresponding to the client subroutine is provided, when execution client subroutine makes a mistake, calling customer terminal program error handling procedure, producing corresponding extension markup language character string, and should extend the markup language character string and be sent to client master routine error handler via the subroutine error handler with one first predefined procedure; Error handler corresponding to the remote call-in program is provided, when execution remote call-in program makes a mistake, call remote calling order error handler, to produce corresponding extension markup language character string, this extends the markup language character string and is sent to client via remote call-in program error handling procedure, abides by first predefined procedure afterwards equally and is sent to client master routine error handler; Error handler corresponding to the server end master routine is provided, when execution server end master routine makes a mistake, call server end master routine error handler, to produce this corresponding extension markup language character string, the server end master routine extends the markup language character string and transmits via server end master routine error handler, and is passed to client master routine error handler with first predefined procedure via client subroutine error handler; Error handler corresponding to the server end subroutine is provided, when execution server end subroutine makes a mistake, call server terminal program error handling procedure, to produce corresponding extension markup language character string, the server end subroutine is extended the markup language character string and is passed to server end master routine error handler with one second predefined procedure via server end subroutine error handler, after this extension markup language character string is sent to client, be passed to client master routine error handler with first predefined procedure again; And provide transport communication protocol one server end extension markup language character string transmission procedure to cooperate with remote call-in program error handling procedure, be used for delivery server end extension markup language character string and remote call-in program extension markup language character string respectively to client.
Description of drawings
Fig. 1 is the synoptic diagram of distributed network internet.
Fig. 2 is the schematic flow sheet of java script language program error handling method of the present invention.
Embodiment
See also Fig. 2, Fig. 2 is the schematic flow sheet of java script language program error handling method of the present invention.World-wide web 50 includes a client 100, a server end 150, a transport communication protocol 200 and a database 250.
(step 104) makes a mistake when the user carries out the client master routine by user's interface 102, has an error handler code block to be used for handling the situation that master routine makes a mistake specially in its master routine.When execution client master routine makes a mistake, can call out the master routine error handler, and mistake is sent to master routine fault processing storehouse with a form of extending SGML (XML) format string.The method of being utilized is trial built-in in the java script language program and error trapping function.Master routine includes at least one subroutine, when execution subroutine (step 106) makes a mistake, the same utilization attempted and the error trapping function is done in the subroutine error handler code block and caught subroutine file name and the function that makes a mistake, and is passed to subroutine fault processing storehouse (step 107) with the form of extending the markup language character string equally.Subroutine fault processing storehouse will respond the extension markup language character string that the subroutine mistake produced and be passed to master routine fault processing storehouse 105 with one first predefined procedure.This first predefined procedure is just in time called out the reversed in order that subroutine is carried out with master routine.In other words, when master routine A includes subroutine B, and subroutine B is when including a subroutine C in addition, and in general each program implementation order will be A → B → C.In the present invention, when subroutine C makes a mistake, its corresponding extension markup language character string that produces will be only the fault processing storehouse of master routine A then by the fault processing storehouse that its corresponding fault processing storehouse begins to be passed to subroutine B.Afterwards, the content of the fault processing storehouse of all clients (XML format string) can be presented on the display screen of client (shown in step 109) by call program.Because the XML format string includes information such as program function that master routine (or subroutine) makes a mistake and file name, so only show that to allow system maintenance person or program developer know just enough.
Transport communication protocol (being preferably an XMLHttp transport communication protocol) 200 includes an XML remote call-in program 201 and is used for specially handling the requirement that comes from 100 pairs of server ends 150 of client, or the result of server end 150 customer in response ends 100 (in general this remote call-in program 201 is to be stored in server end 150).When this remote call-in program 201 makes a mistake, same call remote calling order error handler, and the extension markup language character string of gained is delivered to the remote call-in program error handles storehouse 202, can be sent to client 100 equally afterwards.It then is via server end XML format string transmission procedure 203 past clients 100 transmission that are positioned at transport communication protocol 200 equally that server end master routine or server end subroutine are carried out the corresponding extension markup language character string that produces of the institute that makes a mistake.Or rather, the server end subroutine is carried out the 153 extension markup language character strings that produced that make a mistake will follow the second above-mentioned predefined procedure, especially corresponding fault processing storehouse own begins to be sent to server end XML format string transmission procedure 203 via server end master routine fault processing storehouse 152, follows first predefined procedure afterwards again and is sent to client master routine processing storehouse 105 by client subroutine fault processing storehouse 107.
Because transport communication protocol is preferably an XMLHttp communication protocol, the data of client 100 and 150 transmission of server end all need meet the data formats of XMLHttp communication protocol, that is to say, desire to be the XMLHttp form by server end 150 via the data that transport communication protocol 200 transmits, so under this situation, must have and judge whether the data that comes from server end 150 belongs to the special string of record erroneous procedures function and file name.This special string is preferably one<error〉character string, when including this special<error in the XMLHttp format string of judging by server end 150 passbacks〉during character string, can judge that this error handler by the responder mistake is produced, so need to transmit toward client 100 through server end format string transmission procedure 203.Otherwise it can just be sent to client 100 by server end through XMLHttp remote call-in program 201 directly according to original default bang path.
The following is the program source code of an example program of client:
<HTML>
<HEAD>
<script?type=“text/javascript”src=“client?ErrorHandle.js”></script>
// quote client error handling procedure clientHrrorHandle.js//
<script?LANGUAGE=javascript>
main();
function?main(){
try{
subFunction();
}catch(e){
/ used mistake in the java script language attempt and catch (try and catch) grammer/
// first parameter is fixed as " e ";
// the second parameter is program function " main ";
// the three parameter is program entity file name " clientSample.asp ";
errorDialogV2(e,“main”,“clientSample.asp”);
//rrorDialogV2 function for quote eject the error message interface //
}finally{
}//finally
}
/******************************************/
// subroutine " subFunction " equally also has been to use and has attempted catching grammer
/******************************************/
function?subFunction(){
try{
sub?SubFunction();
}catch(e){
var?functionName=“subFunction”;
var?fileName=“clientSample.asp”
/******************************************/
// first parameter is fixed as " e "
// the second parameter is the program function title
// the three parameter is the program entity file name
/******************************************/
throw?errorHandle(e,functionName,fileName);
}finally{
}//finally
}
/******************************************/
The subroutine subSubFunction of // subroutine subFunction, or another one subroutine also use
Attempt to catch grammer
/******************************************/
function?subSubFunction(){
try{
throw“Error?occurred”;
// make a mistake, promptly lose so-called " Error occurred information " //
}catch(e){
var?functionName=“subSubFunction”;
var?filename=“clientSample.asp”
/******************************************/
// first parameter is fixed
// the second parameter is program function
// the three parameter is the program entity file name
/******************************************/
throw?errorHandle(e,functionName,fileName);
}finally{
}//finally
}
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Can find by above-mentioned client example program, need quote error handler errorHandle corresponding to this client example program, in case during wrong generation, promptly call out this error handler, and file name and program function that mistake takes place are exported with the form of extending the markup language character string.In this embodiment, because output has the information of " Error occurred ", when carrying out, make a mistake so be represented as subSubFunction.The original program code of the client error handling procedure errorHandle that is quoted is as follows:
function?errorHandle(e,functionName,fileName){
Try{ // when first parameter e kenel is an object //
if(typeof(e)==“object”){
retum“<error>”+e.description+“<function?name=””+functiortName
+””/><file?name=””+fileName+””/></error></error>”;
Else if (typeof (e)==" string ") // when first parameter e kenel is a character string //
if(e.match(/<error>/i)==null){
// judge that whether this character string is<error, and have respectively different form output //
return“<error>”+e+”<function?name=””+functionName+””/><file
name=””+fileName+””/></error>”;
}else{
return?e+“<error><function?name=””+functionName+””/><file
name=””+fileName+””/></error>”;
}
}else{
return“<error>”+e+“<function
name=””+functionName+””/><filename=””+filename+””/></error>\
}
}catch(e){alert(“Catch?Error?in”+filename)}
}
Thus, just handle the output that storehouse has following XML format string at client error:
<errors>
<error>
Error?occurred
<funcition?name=“subSubFunction”/>
<file?name=“clientSample.asp”/>
</error>
<error>
<function?name=“SubFunction”/>
<file?name=“clientsample.asp”/>
</error>
<error>
<function?name=“main”/>
<file?name=“clientsample.asp”/>
</error>
</errors>
This shows that the upstream direction of this XML format string is to begin to carry out direction with one with call program from the subroutine that makes a mistake (first direction by main → subFunction → subSubFunction) opposite is back to master routine fault processing storehouse in proper order.
Continue to provide an example program that is applied to server end as follows:
<%@Language=JaVaScript%>
<!--quote server end error message handling procedure--〉
<!--#include?File=“serverErrorHandle.inc”-->
<%
/******************************************/
// program starting point
/******************************************/
main();
/******************************************/
// master routine " main "
/******************************************/
function?main(){
try{
sunFunction();
}catch(e){
var?functionName=“main”;
var?filename=“serverSample.asp”;
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function " main "
// the three parameter is program entity file name " serverSample.asp "
/******************************************/
error?Write(e,functionName,fileName)
}finally{
}
}
/******************************************/
// subroutine " subFunction "
/******************************************/
function?sunFunction(){
try{
subFunction();
}catch(e){
var?functionName=“subFunction”
var?fileName=“serverSample.asp”;
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function " subFunction "
// the three parameter is program entity file name " serverSample.asp "
/******************************************/
throw?errorHandle(e,functionName,fileName);
}finally{
}
}
/******************************************/
// another subroutine " subSubFunction "
/*****************************************/
function?subSubFunction(){
try{
Throw " Error occurred " // appearance " Error occurred " character string //
}catch(e){
var?functionName=“subSubFunction”;
var?fileName=“serverSample.asp”;
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function " subSubFunction "
// the three parameter is the program entity file name " serverSample.asp "
/******************************************/
throw?errorHandle(e,functionName,fileName);
}finally{
}
}
%>
As previously mentioned, server end has an error handler crrorHandle to come server end master routine or subroutine execution are handled when making a mistake equally.In the present embodiment, when carrying out, subroutine subSubFunction makes a mistake equally (occurring as can be known) by character string Error occurred.The execution of this server there is no doubt that by master routine and begins to carry out toward the subroutine direction always, when each program code block makes a mistake, catch mistake by the pairing error handler of program code block, and with mistake with the output of the form of XML format string, and that the direction of transfer of XML format string and program are called out the direction of execution is just the opposite.Next be an embodiment of server-side error handling procedure:
<%
/******************************************/
// processing error message wrapping XML form
/******************************************/
function?errorHandle(e,functionName,fileName){
try{
if(typeof(e)==“object”){
return“<error>”+e.description+“<function
name=””+functionName+””/><file?name=””+fileName+””/></error></error>”;
}else?if(typeof(e)==“string”){
if(e.match(/<error>/i)==null){
retutn“<error>”+e+“<function?name=””+functionName+””><file
name=””+fileName+””/></error>”;
}else{
return?e+“<error><function?name=””+functionNane+””/><file
name=””+fileName+””></error”;
}
}else{
return“<error>”+e+“<function
name=””+functionName+””/><file?name=””+fileName+””></error”;
}
}catch(e){Response.Write(“<error>”+e.description+“in?File”+fileName+
“</error>)”;}
}
/******************************************/
// handle error message wrapping XML form and be written to client
/******************************************/
function?error?Write(e,functionName,fileName){
try{
Response.CharSet=“Big5”;
Response.ContentType=“text/xml”;
var?errorString=“”;
if(typeof(e)==“object”)
{
errorString=“<errors>”+errorString+“<error>”+e.description+
“<function?name=””+functionName+””/><file
name=””+fileName+””/></error></errors>”;
}//if
else?if(typeof(e)==“string”){
if(e.match(/<error>/i)==null){
errorString=“<errors>”+errorString+“<error>”+e+“<function
name=””+functionName+””/><file?name=””+fileName+””></error></errors>”;
}else{
errorString=“<errors>”+errorString+e+“<error><function
name=””+functionName+””/><file?name=””+fileName+””/></error></errors>”;
}
}else{
errorString=“<errors>”+errorString+“<error>”+e+“<function
name=””+functionName+””/><file?name=””+fileName+””/></error></errors>”;
}//else
Response.Write(errorString)
}catch(e){Response.Write.(“<error>”+e.description+“in?File”+fileName+
“</error>”);}
}
%>
After the mistake of server end subroutine is packaged into the XML format string, begin to transmit with the subroutine fault processing storehouse of one second predefined procedure by correspondence.Because the XML format string of server end need be sent to the master routine fault processing storehouse of client by the server end XML format string transmission procedure of transport communication protocol, no matter carry out the mistake that is taken place so that client master routine fault processing storehouse can be collected all clients or server end even remote call-in program.Identical with the client error handling procedure, this server-side error handling procedure embodiment promptly packs error message (including the file name and the program function that make a mistake) at the beginning in the mode of XML format string, and then is sent to transport communication protocol and client.
Following is the program source code that is used for remote call-in program one embodiment of client calls server end:
<!--the misquotation treatment mechanism ejects the error message interface--〉
<!--#include?File=“errorPopV2.asp”-->
<HTML>
<HEAD>
<!--quoting the client error handling procedure--〉
<script?type=“text/javascript”src=“clientErrorHandle.js”></script>
<!--quoting the communications protocol error handler--〉
<script?type=“text/javascript”src=“xm1Http.js”></script>
<script?LANGUAGE=javascript>
/******************************************/
// program starting point
/******************************************/
main();
/******************************************/
// master routine
/******************************************/
function?main(){
try{
subFunction()
}catch(e){
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function " main "
// the three parameter is program entity file name " clientSample.asp "
/******************************************/
errorDialogV2(e,“main”,“clientSample.asp”);
}finally{
}//finally
}
/******************************************/
// subroutine subFunction
/******************************************/
function?subFunction(){
try{
subSubFunction();
}catch(e){
var?functionName=“subFunction”;
var?fileName=“clientSample.asp”;
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function " subFunction "
// the three parameter is program entity file name " clientSample.asp "
/******************************************/
throw?errorHandie(e,functionName,fileName);
}finally{
}//finally
}
/******************************************/
V subroutine subSubFunction
/******************************************/
function?subSubFunction(){
try{
/******************************************/
// call server end provides service
// first parameter is a Program path
The object of // the second parameter for transmitting
/******************************************/
GetInfo?V2(“serverSample.asp”,null);
}catch(e){
var?functionName=“subSubFunction”;
var?fileName=“serverSample.asp”
/******************************************/
// first parameter is fixed as " e "
// the second parameter is program function
// the three parameter is the program entity file name
/******************************************/
throw?errorHandle(e,functionName,fileName);
}finally{
}//finally
}
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
The remote call-in program has the possibility that makes a mistake equally when carrying out, in case it makes a mistake, provide corresponding error handler and fault processing storehouse equally and be used for catching the collection mistake, with the past client transmission of the form of extending the markup language character string, XMLHttp transport communication protocol itself is except being responsible for the communication between client and server end, include judgement in addition by whether having in the data that server end returned<error〉existence of character string, if have, then representing this is not the data of transmitting between general client and server end, but a wrong data.So wrong data will be by server end XML format string transmission procedure toward the client transmission.
Information such as the source code of the wrong example program that comprises client, server end and remote call-in program and error handler source code more than are provided.In fact, write form, when the service of server end reception client calls makes a mistake, can describe and transfer to the transport communication protocol transmission with complete error message storehouse seizure and with the XML file layout by above-mentioned several specific program codes; The mark that comprises error message that transport communication protocol then can complete capture server end be exported extends the language format character string, and it is passed to client process; And client more can be exported the quick reference of XML error character statements based on collusion program developer at last being sent to the complete seizure of XML error character string of client by server through transport communication protocol.One embodiment of the form of this last output XML error character string;
<?xml?version=“1.0”encoding=“big5?”>
<SMEPDM-ErrorLog>
<errors>
<errors>
<error>Error?occurred<function?name=“subSubFunction”/>
<file?name=“serverSample.asp”/>
</error>
<error>
<function?name=“sunFunction”/>
<file?name=“serverSample.asp”/>
</error>
<error>
<function?name=“main”/>
<file?name=“serverSample.asp”/>
</error>
</error>
<error><error?position=“protocol”>
<function?name=“GetInfo?V2”/>
<file?name=“xmlHttp.js”/>
</error>
<error>
<function?name=“subSubFunction”/>
<file?name=“clientSample.assp”/>
</error>
<error>
<function?name=“subFunction”/>
<file?name=“clientSample.asp”/>
</error>
<error>
<function?name=“main”/>
<file?name=“clientSample.asp”/>
</error>
</error>
</SMEPDM-ErrorLog>
XML format string after this output promptly can mode as above show or allow program developer be understood to be to make a mistake over there actually.With present embodiment, so-called when searching out<error〉character string and " Error occurred " show the position time, i.e. the position that representative makes a mistake is on the subroutine subSubFunction of server end.Show file name or the function that whole distributed network internet makes a mistake with this kind text mode, program developer can reach the purpose of learning wrong place fast at a glance by the setting of this log file, also can shorten the time-histories of whole debug naturally.By above-mentioned error logger file, we as can be known, when the subSubfunction function among the server end file serverSample.asp is made mistakes, its corresponding XML format string that produces from will along the server end file call out reverse, be passed to transport communication protocol by server end.And transport communication protocol will be by judgement<error〉existence of special string, learn this moment by the server end passback be one to disclose the XML format string of error message, and can be delivered to client by server end XML format string transmission procedure.And then be delivered to client (master routine) fault processing storehouse by client calls program reverse and collect.The result of this collection can serviced device end be recorded as file content as above, or is presented on the display screen of program developer.
Above-mentioned error message display mode is based on a kind of error message manner of packing of extending SGML for the basis.This manner of packing provide a pair of initial label (be preferably<errors〉with</errors), between this is to initial label, include at least one pair of node label (be preferably<error〉with</error).Include corresponding to this a file name and program function (respectively as clientSample.asp and main) between every pair of node label the node label.This kind error message manner of packing includes in addition when program in the file that a book character string (as " Error occurred ") is used for representing that the node label behind this book character string comprised is carried out and makes a mistake.In addition, the arrangement mode of these node labels is according to a predefined procedure, this predefined procedure just and in the file program function called out the reversed in order of execution.
With respect to prior art, the present invention provides a kind of form of writing based on error handler that extends SGML and executive routine to client, server end and transport communication protocol respectively.Thus, no matter be and even that client, server end remote call-in program are when execution makes a mistake, corresponding error handler all can be handled these wrong program function and file names that takes place, and, be passed to client master routine fault processing storehouse by the opposite sequence of call program with a form of extending the markup language character string.Therefore provide a complete error message and to understand understandable extension markup language, allow program developer can understand the occurrence positions of program error soon, and quicken the action of whole debug.
The above only is a preferred embodiment of the present invention, and all general variation and modifications of being made according to the present patent application claim all belong to the coverage of this patent.
Claims (23)
1. java script language program error handling method that is applied to a distributed network internet, this distributed network internet includes: a client, a server end and a database, this client includes at least one master routine, each this master routine includes at least one subroutine, this server end includes at least one master routine equally, each this server end master routine includes at least one subroutine, an and remote call-in program, this client and this server end are to connect each other by a transport communication protocol, include the following step:
(a) provide corresponding to this client master routine one error handler, when this client master routine of execution makes a mistake, call out this client master routine error handler, to produce a corresponding extension markup language character string;
(b) provide a error handler corresponding to this client subroutine, when this client subroutine of execution makes a mistake, call out this client subroutine error handler, producing this corresponding extension markup language character string, and should extend the markup language character string and be sent to this client master routine error handler by this subroutine error handler with one first predefined procedure;
(c) provide a error handler corresponding to this remote call-in program, when this remote call-in program of execution makes a mistake, call out this remote call-in program error handling procedure, to produce this corresponding extension markup language character string, be sent to this client by this remote call-in program error handling procedure, abide by this first predefined procedure afterwards equally this teleprogram extension markup language character string is sent to this client master routine error handler;
(d) provide a error handler corresponding to this server end master routine, when this server end master routine of execution makes a mistake, call out this server end master routine error handler, producing past this client transmission of this corresponding extensions markup language character string, and be passed to this client master routine error handler by this client subroutine error handler with this first predefined procedure;
(e) provide a error handler corresponding to this server end subroutine, when this server end subroutine of execution makes a mistake, call out this server end subroutine error handler, to produce this corresponding extension markup language character string, it is to be passed to this server end master routine error handler with one second predefined procedure by this server end subroutine error handler that this server end subroutine is extended the markup language character string, be sent to this client afterwards, be passed to this client master routine error handler with this first predefined procedure again; And
(f) provide this transport communication protocol one server end to extend markup language character string transmission procedure, cooperate with this remote call-in program error handling procedure, be used for transmitting this server end extension markup language character string and this remote call-in program respectively and extend markup language character string to this client;
Wherein this client master routine, this client subroutine, this server end master routine, this server end subroutine and this remote call-in program all include and attempt writing form with the program code of catching and cooperate with corresponding error handler, to export the extension markup language character string of correspondence.
2. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1, it is characterized in that, include a step (g) will be sent to this client master routine error handler by this server end record of this client remote call-in this extension markup language character string in addition.
3. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1, it is characterized in that, include a step (h) in addition and show this extension markup language character string that has been sent to this client master routine error handler by this client.
4. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described first predefined procedure is the reversed in order of subroutine under calling out with this client master routine.
5. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described second predefined procedure is the reversed in order of subroutine under calling out with this server end master routine.
6. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described client extends the markup language character string and include a file name that this client master routine and this client subroutine make a mistake and a program function that makes a mistake.
7. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described server end extends the markup language character string and includes a file name that this server end master routine and this server end subroutine make a mistake and a program function that makes a mistake.
8. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described remote call-in program extends the markup language character string and include a file name that this remote call-in program makes a mistake and a program function that makes a mistake.
9. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described to have this server end to extend markup language character string in judgement be whether to include a special string in the data that return according to this server end by this server end passback.
10. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 9 is characterized in that described special string is<error 〉.
11. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described transport communication protocol is an XMLHttp agreement.
12. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described client master routine error handler and this client subroutine error handler are all an identical program code and write and form.
13. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 1 is characterized in that described server end master routine error handler and this client subroutine error handler are all an identical program code and write and form.
14. method that is applied to the java script language program fault processing of a distributed network internet, this distributed network internet includes: a client, a server end and an XMLHttp transport communication protocol are used for getting in touch this client and this server end, this client includes at least one master routine, each this master routine includes at least one subroutine, this server end includes at least one master routine equally, each this server end master routine includes at least one subroutine, includes the following step:
(a) provide this client corresponding to this client one error handler, when carrying out this client master routine or this client subroutine and make a mistake, call out this client error handling procedure, to produce a corresponding extension markup language character string, and handled by a master routine fault processing storehouse and a subroutine fault processing storehouse respectively, and this subroutine extension markup language character string is to be passed to this master routine fault processing storehouse with one first predefined procedure by this subroutine fault processing storehouse;
(b) provide this transport communication protocol one error handler, when this client master routine or client subroutine are called out this server end master routine or server end subroutine when making a mistake, call out this transport communication protocol error handler, handle to handle storehouse by a remote error to produce this corresponding extension markup language character string, this extension markup language character string is abideed by this first predefined procedure equally and is sent to this master routine fault processing storehouse;
(c) provide corresponding to this server end one error handler, when carrying out this server end master routine or subroutine and make a mistake, call out this server-side error handling procedure, to produce this corresponding extension markup language character string, and handled by a master routine fault processing storehouse and a subroutine fault processing storehouse respectively, and this subroutine extension markup language character string is passed to this master routine fault processing storehouse with one second predefined procedure by this subroutine fault processing storehouse; And
(d) provide this transport communication protocol one to extend markup language character string transmission procedure, be used for the extension markup language character string that this server-side error handling procedure is produced is passed to this client;
Wherein, when this server end subroutine of execution makes a mistake, the extension markup language character string that should server end subroutine mistake be produced is passed to this transport communication protocol according to this second predefined procedure by this server end, and be passed to this client by this extension markup language character string transmission procedure, follow this first predefined procedure again and be passed to this client master routine and handle storehouse; This client master routine, this client subroutine, this server end master routine, this server end subroutine and this remote call-in program all include attempts writing the form international practice with the program code of catching and comes to cooperate with corresponding error handler, with the extension markup language character string of the exporting correspondence fault processing storehouse of correspondence extremely.
15. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14, it is characterized in that, include a step (e) will be sent to this client error handling procedure by this server end record of this client remote call-in this extension markup language character string in addition.
16. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14, it is characterized in that, include a step (f) in addition and show this extension markup language character string that has been sent to this client error handling procedure by this client.
17. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14, it is characterized in that described first predefined procedure and this client master routine call out under the reversed in order of subroutine.
18. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14, it is characterized in that described second predefined procedure and this server end master routine call out under the reversed in order of subroutine.
19. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14 is characterized in that described client extends the markup language character string and include a file name that this client master routine and this client subroutine make a mistake and a program function that makes a mistake.
20. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14 is characterized in that described server end extends the markup language character string and includes a file name that this server end master routine and this server end subroutine make a mistake and a program function that makes a mistake.
21. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14 is characterized in that the program that described transport communication protocol error handler produced extends a file name that makes a mistake when the markup language character string includes this server end of this client calls and a program function that makes a mistake.
22. the java script language program error handling method that is applied to a distributed network internet as claimed in claim 14 is characterized in that described to have this server end to extend markup language character string in judgement be whether to include a special string in the data that return according to this server end by this server end passback.
23. script program error disposal route as claimed in claim 22 is characterized in that described special string is<error 〉.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB03100699XA CN100424653C (en) | 2003-01-17 | 2003-01-17 | Method for processing error of java script language program used for distribution type internet network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB03100699XA CN100424653C (en) | 2003-01-17 | 2003-01-17 | Method for processing error of java script language program used for distribution type internet network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1517875A CN1517875A (en) | 2004-08-04 |
CN100424653C true CN100424653C (en) | 2008-10-08 |
Family
ID=34281274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB03100699XA Expired - Fee Related CN100424653C (en) | 2003-01-17 | 2003-01-17 | Method for processing error of java script language program used for distribution type internet network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100424653C (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100487670C (en) * | 2007-03-08 | 2009-05-13 | 中国科学院研究生院 | Error capturing plug-in used in information system and method of use thereof |
CN101715086B (en) * | 2008-10-07 | 2011-12-07 | 中兴通讯股份有限公司 | Error correction processing method for internet protocol television set top box |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1058124A (en) * | 1990-07-12 | 1992-01-22 | 中国科学院软件研究所 | Terminal adapter in the integrated services digital network |
CN1118472A (en) * | 1994-05-26 | 1996-03-13 | 摩托罗拉公司 | Combined multiplier-shifter and method therefor |
WO1998038575A1 (en) * | 1997-02-28 | 1998-09-03 | Transmeta Corporation | Method and apparatus for correcting errors in computer systems |
CN1339128A (en) * | 1999-01-22 | 2002-03-06 | 因芬尼昂技术北美公司 | On-chip debug system |
-
2003
- 2003-01-17 CN CNB03100699XA patent/CN100424653C/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1058124A (en) * | 1990-07-12 | 1992-01-22 | 中国科学院软件研究所 | Terminal adapter in the integrated services digital network |
CN1118472A (en) * | 1994-05-26 | 1996-03-13 | 摩托罗拉公司 | Combined multiplier-shifter and method therefor |
WO1998038575A1 (en) * | 1997-02-28 | 1998-09-03 | Transmeta Corporation | Method and apparatus for correcting errors in computer systems |
CN1339128A (en) * | 1999-01-22 | 2002-03-06 | 因芬尼昂技术北美公司 | On-chip debug system |
Also Published As
Publication number | Publication date |
---|---|
CN1517875A (en) | 2004-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9479343B2 (en) | Engine for processing content rules associated with locations in a page | |
CN100399290C (en) | Gethering enriched server activity data of cached web content | |
CN100474293C (en) | Electronic announcement board system and mail service device | |
Offutt et al. | Generating test cases for web services using data perturbation | |
US7158988B1 (en) | Reusable online survey engine | |
US20020046235A1 (en) | Document creation and delivery | |
CN100580672C (en) | Context based navigation assembly and method | |
US20110099466A1 (en) | Multiple Bindings in Web Service Data Connection | |
US20030018707A1 (en) | Server-side filter for corrupt web-browser cookies | |
CN101867620B (en) | Method for viewing pre-message through crossing security zone | |
US20080148397A1 (en) | Method and apparatus for lawful interception of web based messaging communication | |
CN108038207A (en) | A kind of daily record data processing system, method and server | |
CN100550015C (en) | Improved user interface | |
CN108920437A (en) | The method that XML document is converted into html format document based on XSL | |
US20050216829A1 (en) | Wireless content validation | |
De Almeida et al. | Exploring perturbation based testing for web services | |
US20050235340A1 (en) | Configuration management apparatus and related methods | |
WO2001052078A1 (en) | Dead hyper link detection method and system | |
CN100424653C (en) | Method for processing error of java script language program used for distribution type internet network | |
CN108563570B (en) | Method for automatically storing code processing record, readable storage medium and electronic device | |
US7559018B2 (en) | Computer-implemented system and method for data collection | |
WO2000074193A1 (en) | User support system and method | |
US20020087915A1 (en) | Error handler method and system for internet-based applications | |
GB2402028A (en) | Creating and analyzing an identifier indicating whether data is in an expected form | |
US7765465B2 (en) | Enhanced electronic data interchange (EDI) reporting with hyperlinks to EDI source information |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081008 Termination date: 20210117 |
|
CF01 | Termination of patent right due to non-payment of annual fee |