1 /*jslint nomen: true, evil: false, browser: true */
3 * Pass back the values that that the user selected.
6 window['arguments'][0].out = {
12 var locale = document.getElementById("strings");
13 var params = window['arguments'][0];
14 var reason = document.getElementById('reason');
15 var textnode = '**error**';
17 * http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsError.h#262 */
18 if(params.exception == 'NS_ERROR_FILE_INVALID_PATH' ||
19 params.exception == 'NS_ERROR_FILE_UNRECOGNIZED_PATH' ||
20 params.exception == 'NS_ERROR_FILE_TARGET_DOES_NOT_EXIST' ||
21 params.exception == 'NS_ERROR_FILE_INVALID_PATH' ||
22 params.exception == 'NS_ERROR_FILE_NOT_FOUND' ||
23 params.exception == 'NS_ERROR_FILE_NAME_TOO_LONG' ) {
24 textnode = locale.getFormattedString('bad.noent', [params.path]);
25 } else if(params.exception == 'NS_ERROR_FILE_ACCESS_DENIED' ||
26 params.exception == 'NS_ERROR_FILE_IS_DIRECTORY' ||
27 params.exception == 'NS_ERROR_FILE_IS_LOCKED' ) {
28 textnode = locale.getFormattedString('bad.noexec', []);
30 /* At this point, we don't know exactly why it failed...
31 * Try some heuristics. */
32 } else if(!params.path) {
33 textnode = locale.getFormattedString('bad.noset',[]);
34 } else if(params.exists) {
35 textnode = locale.getFormattedString('bad.noexec', []);
37 textnode = locale.getFormattedString('bad.noent', [params.path]);
39 reason.appendChild(document.createTextNode(textnode));