mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
* Fixed #5210 * Added function to check error to ensure get string
This commit is contained in:
@@ -13,6 +13,7 @@ import { AppContext } from './common/appContext';
|
|||||||
import { ApiWrapper } from './common/apiWrapper';
|
import { ApiWrapper } from './common/apiWrapper';
|
||||||
import { IExtensionApi } from './types';
|
import { IExtensionApi } from './types';
|
||||||
import { CellType } from './contracts/content';
|
import { CellType } from './contracts/content';
|
||||||
|
import { getErrorMessage } from './common/utils';
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ async function openNotebook(): Promise<void> {
|
|||||||
vscode.window.showTextDocument(doc);
|
vscode.window.showTextDocument(doc);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
vscode.window.showErrorMessage(err);
|
vscode.window.showErrorMessage(getErrorMessage(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +147,7 @@ async function runActiveCell(): Promise<void> {
|
|||||||
throw new Error(noNotebookVisible);
|
throw new Error(noNotebookVisible);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
vscode.window.showErrorMessage(err);
|
vscode.window.showErrorMessage(getErrorMessage(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +160,7 @@ async function runAllCells(): Promise<void> {
|
|||||||
throw new Error(noNotebookVisible);
|
throw new Error(noNotebookVisible);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
vscode.window.showErrorMessage(err);
|
vscode.window.showErrorMessage(getErrorMessage(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +179,7 @@ async function addCell(cellType: azdata.nb.CellType): Promise<void> {
|
|||||||
throw new Error(noNotebookVisible);
|
throw new Error(noNotebookVisible);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
vscode.window.showErrorMessage(err);
|
vscode.window.showErrorMessage(getErrorMessage(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,4 +222,4 @@ export function deactivate() {
|
|||||||
if (controller) {
|
if (controller) {
|
||||||
controller.deactivate();
|
controller.deactivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user