J.P.A.L.

 

error

Page history last edited by vietmusic 2 yrs ago

error

 

This function gets called by all the JPAL API functions whenever they run into a problem, returning an alert() if there is an error. It's format is:

 

jpal.error(err);

 

err is a string.

 

Note that the errors it returns are JPAL specific. API errors are returned in the JSON objects returned to individual handlers. Furthermore, you usually won't call error yourself. Instead you may redefine it as a function of your own, either to suppress the error alert or to log it yourself somehow. Here's an example:

 

errorList = new Array();
function newErrorHandler(err) {
errorList.push(err);
}
jpal.error = newErrorHandler;

Comments (0)

You don't have permission to comment on this page.