For the ease of debugging and centralizing error handling I would like to have a global function that takes care of reporting catched errors. All catched errors are in one and the same global script library, but if I try to centralize the error handling, I don't get any error message at all. The idea is to call a special error reporting function from all the try-catch statements in the library but either it isn't working or I've missed something.
The error variable in catch(error) is also made global so that it would be possible for the different functions to access it.
Example, nevermind no error would be thrown here:
function checkWeather()
{
try{
if(temperature > "25c")
var hot = true;
}
catch(error)
{
handleCatchedError();
}
}
handleCatchedError()
{
xfa.host.messageBox(error); //No error reported??
}
var error = "";
Any thoughts of a solution?