src/vs/base/common/errorMessage.ts/detectSystemErrorMessage
function detectSystemErrorMessage(exception: any): string {

	// See https://nodejs.org/api/errors.html#errors_class_system_error
	if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') {
		return nls.localize('nodeExceptionMessage', "A system error occurred ({0})", exception.message);
	}

	return exception.message || nls.localize('error.defaultMessage', "An unknown error occurred. Please consult the log for more details.");
}