25
}
26
27
>
function detectSystemErrorMessage(exception: any): string {
errorMessage.ts
28
>
29
>
// Custom node.js error from us
30
>
if (exception.code === 'ERR_UNC_HOST_NOT_ALLOWED') {
31
return `${exception.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`;
32
}
34
>
// See https://nodejs.org/api/errors.html#errors_class_system_error
35
>
if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') {
36
return nls.localize('nodeExceptionMessage', "A system error occurred ({0})", exception.message);
37
}
39
>
return exception.message || nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
40
>
}
41
42
/**