mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 22:12:26 +01:00
better error message when trying to open huge files #43861
This commit is contained in:
@@ -193,8 +193,11 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
|
||||
return promise.then(success => {
|
||||
if (!success) {
|
||||
return TPromise.wrapError(new Error('cannot open ' + uri.toString()));
|
||||
} else if (!this._modelIsSynced[uri.toString()]) {
|
||||
return TPromise.wrapError(new Error('cannot open ' + uri.toString() + '. Detail: Files above 50MB cannot be synchronized with extensions.'));
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
}, err => {
|
||||
return TPromise.wrapError(new Error('cannot open ' + uri.toString() + '. Detail: ' + toErrorMessage(err)));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user