Evaluation throws an exception
high
A test evaluation ended with an uncaught exception instead of a return value. The engine treats this as a script failure for that request.
Why it matters
This is the observed counterpart of static findings such as PAC-E005: for at least one of the test URLs the function threw instead of returning. Engines do not retry or use a later branch; the request is handled as if the PAC failed. In Chromium and Firefox that means a direct connection. If the exception is only thrown for some hosts, the PAC “works” in a quick manual test and fails in production for exactly those hosts.
How to fix
Look at the exception detail and the deciding line; common causes are undefined functions, typos in variable names and calling methods on undefined.
Examples
Bad
function FindProxyForURL(url, host) {
var parts = host.split(".");
if (parts[parts.length - 1] == "test" && undefinedList.indexOf(host) >= 0) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open bad example in checkerGood
var directHosts = ["intranet.test", "wiki.test"];
function FindProxyForURL(url, host) {
if (directHosts.indexOf(host) >= 0) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open good example in checkerRelated rules
- Call to a function that is not defined PAC-E005
- Exceptions are caught and turned into DIRECT PAC-X011