Adopt error no telemetry for filesystem providers. (#148832)

Adopt erorr no telemetry
pull/151679/head
Logan Ramos 2022-06-07 15:53:21 -04:00 committed by GitHub
parent 070fb39a3c
commit cfecdd5461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import { coalesce } from 'vs/base/common/arrays';
import { Promises, ResourceQueue } from 'vs/base/common/async';
import { bufferedStreamToBuffer, bufferToReadable, newWriteableBufferStream, readableToBuffer, streamToBuffer, VSBuffer, VSBufferReadable, VSBufferReadableBufferedStream, VSBufferReadableStream } from 'vs/base/common/buffer';
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
import { ErrorNoTelemetry } from 'vs/base/common/errors';
import { Emitter } from 'vs/base/common/event';
import { hash } from 'vs/base/common/hash';
import { Iterable } from 'vs/base/common/iterator';
@ -136,7 +137,7 @@ export class FileService extends Disposable implements IFileService {
// Assert provider
const provider = this.provider.get(resource.scheme);
if (!provider) {
const error = new Error();
const error = new ErrorNoTelemetry();
error.name = 'ENOPRO';
error.message = localize('noProviderFound', "No file system provider found for resource '{0}'", resource.toString());

View File

@ -17,6 +17,7 @@ import { CharCode } from 'vs/base/common/charCode';
import { VSBuffer } from 'vs/base/common/buffer';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
import { ErrorNoTelemetry } from 'vs/base/common/errors';
class FsLinkProvider {
@ -295,7 +296,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
private _getFsProvider(handle: number): vscode.FileSystemProvider {
const provider = this._fsProvider.get(handle);
if (!provider) {
const err = new Error();
const err = new ErrorNoTelemetry();
err.name = 'ENOPRO';
err.message = `no provider`;
throw err;