diff --git a/src/interactive-window/editor-integration/codewatcher.ts b/src/interactive-window/editor-integration/codewatcher.ts index c2ff850e3a2..bea93426505 100644 --- a/src/interactive-window/editor-integration/codewatcher.ts +++ b/src/interactive-window/editor-integration/codewatcher.ts @@ -26,13 +26,13 @@ import { captureTelemetry, sendTelemetryEvent } from '../../telemetry'; import { ICodeExecutionHelper } from '../../platform/terminals/types'; import { InteractiveCellResultError } from '../../platform/errors/interactiveCellResultError'; import { Telemetry, Commands, Identifiers } from '../../platform/common/constants'; -import { IDataScienceErrorHandler } from '../../platform/errors/types'; import { IInteractiveWindowProvider, IInteractiveWindow } from '../types'; import { CellMatcher } from './cellMatcher'; import { ICodeWatcher, ICodeLensFactory } from './types'; import { traceDecoratorVerbose } from '../../platform/logging'; import { TraceOptions } from '../../platform/logging/types'; import * as urlPath from '../../platform/vscode-path/resources'; +import { IDataScienceErrorHandler } from '../../kernels/errors/types'; function getIndex(index: number, length: number): number { // return index within the length range with negative indexing diff --git a/src/interactive-window/interactiveWindow.ts b/src/interactive-window/interactiveWindow.ts index 194c8cb5daa..ffbbe13b5a9 100644 --- a/src/interactive-window/interactiveWindow.ts +++ b/src/interactive-window/interactiveWindow.ts @@ -51,7 +51,6 @@ import { IServiceContainer } from '../platform/ioc/types'; import { SysInfoReason } from '../platform/messageTypes'; import { createOutputWithErrorMessageForDisplay } from '../platform/errors/errorUtils'; import { INotebookExporter } from '../kernels/jupyter/types'; -import { IDataScienceErrorHandler } from '../platform/errors/types'; import { IExportDialog, ExportFormat } from '../notebooks/export/types'; import { generateCellsFromNotebookDocument } from './editor-integration/cellFactory'; import { CellMatcher } from './editor-integration/cellMatcher'; @@ -67,6 +66,7 @@ import { IGeneratedCodeStorageFactory, InteractiveCellMetadata } from './editor-integration/types'; +import { IDataScienceErrorHandler } from '../kernels/errors/types'; import { CellExecutionCreator } from '../kernels/execution/cellExecutionCreator'; import { updateNotebookMetadata } from '../kernels/execution/helpers'; import { chainWithPendingUpdates } from '../kernels/execution/notebookUpdater'; diff --git a/src/interactive-window/interactiveWindowCommandListener.ts b/src/interactive-window/interactiveWindowCommandListener.ts index 4889c119b1a..ca0363ab5ac 100644 --- a/src/interactive-window/interactiveWindowCommandListener.ts +++ b/src/interactive-window/interactiveWindowCommandListener.ts @@ -40,7 +40,7 @@ import { JupyterInstallError } from '../platform/errors/jupyterInstallError'; import { INotebookControllerManager, INotebookEditorProvider } from '../notebooks/types'; import { KernelConnectionMetadata } from '../kernels/types'; import { INotebookExporter, IJupyterExecution } from '../kernels/jupyter/types'; -import { IDataScienceErrorHandler } from '../platform/errors/types'; +import { IDataScienceErrorHandler } from '../kernels/errors/types'; import { IFileConverter, IExportDialog, ExportFormat } from '../notebooks/export/types'; import { IStatusProvider } from '../platform/progress/types'; import { generateCellsFromDocument } from './editor-integration/cellFactory'; diff --git a/src/interactive-window/interactiveWindowProvider.ts b/src/interactive-window/interactiveWindowProvider.ts index 8d3faef8d1f..d595780769b 100644 --- a/src/interactive-window/interactiveWindowProvider.ts +++ b/src/interactive-window/interactiveWindowProvider.ts @@ -53,7 +53,7 @@ import { getInteractiveWindowTitle } from './identity'; import { createDeferred } from '../platform/common/utils/async'; import { getDisplayPath } from '../platform/common/platform/fs-paths'; import { INotebookExporter } from '../kernels/jupyter/types'; -import { IDataScienceErrorHandler } from '../platform/errors/types'; +import { IDataScienceErrorHandler } from '../kernels/errors/types'; import { IExportDialog } from '../notebooks/export/types'; import { IVSCodeNotebookController } from '../notebooks/controllers/types'; import { ICodeGeneratorFactory, IGeneratedCodeStorageFactory } from './editor-integration/types'; diff --git a/src/kernels/errors/jupyterDebuggerNotInstalledError.ts b/src/kernels/errors/jupyterDebuggerNotInstalledError.ts index 4127f86c184..fda2b9ade42 100644 --- a/src/kernels/errors/jupyterDebuggerNotInstalledError.ts +++ b/src/kernels/errors/jupyterDebuggerNotInstalledError.ts @@ -4,7 +4,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class JupyterDebuggerNotInstalledError extends BaseKernelError { constructor(debuggerPkg: string, message: string | undefined, kernelConnectionMetadata: KernelConnectionMetadata) { diff --git a/src/kernels/errors/jupyterInvalidKernelError.ts b/src/kernels/errors/jupyterInvalidKernelError.ts index e0a373253eb..80ca6ab0b02 100644 --- a/src/kernels/errors/jupyterInvalidKernelError.ts +++ b/src/kernels/errors/jupyterInvalidKernelError.ts @@ -5,7 +5,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; import { getDisplayNameOrNameOfKernelConnection } from '../helpers'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class JupyterInvalidKernelError extends BaseKernelError { constructor(kernelConnectionMetadata: KernelConnectionMetadata) { diff --git a/src/kernels/errors/jupyterKernelDependencyError.ts b/src/kernels/errors/jupyterKernelDependencyError.ts index 9e604aeda4f..a9d5a862f97 100644 --- a/src/kernels/errors/jupyterKernelDependencyError.ts +++ b/src/kernels/errors/jupyterKernelDependencyError.ts @@ -6,7 +6,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { getDisplayNameOrNameOfKernelConnection } from '../helpers'; import { KernelConnectionMetadata, KernelInterpreterDependencyResponse } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class JupyterKernelDependencyError extends BaseKernelError { constructor( diff --git a/src/kernels/errors/jupyterWaitForIdleError.ts b/src/kernels/errors/jupyterWaitForIdleError.ts index 61ae4d33c1b..0209f325bbd 100644 --- a/src/kernels/errors/jupyterWaitForIdleError.ts +++ b/src/kernels/errors/jupyterWaitForIdleError.ts @@ -5,7 +5,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class JupyterWaitForIdleError extends BaseKernelError { constructor(kernelConnectionMetadata: KernelConnectionMetadata) { diff --git a/src/kernels/errors/kernelConnectionTimeoutError.ts b/src/kernels/errors/kernelConnectionTimeoutError.ts index a106f249efe..f7f708bb5c2 100644 --- a/src/kernels/errors/kernelConnectionTimeoutError.ts +++ b/src/kernels/errors/kernelConnectionTimeoutError.ts @@ -4,7 +4,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { getDisplayNameOrNameOfKernelConnection } from '../helpers'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class KernelConnectionTimeoutError extends BaseKernelError { constructor(kernelConnection: KernelConnectionMetadata) { diff --git a/src/kernels/errors/kernelDeadError.ts b/src/kernels/errors/kernelDeadError.ts index f1ee32f0278..e14f3bc41c5 100644 --- a/src/kernels/errors/kernelDeadError.ts +++ b/src/kernels/errors/kernelDeadError.ts @@ -4,7 +4,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { getDisplayNameOrNameOfKernelConnection } from '../helpers'; import { KernelConnectionMetadata } from '../types'; -import { WrappedKernelError } from '../../platform/errors/types'; +import { WrappedKernelError } from './types'; export class KernelDeadError extends WrappedKernelError { constructor(kernelConnectionMetadata: KernelConnectionMetadata) { diff --git a/src/kernels/errors/kernelDiedError.ts b/src/kernels/errors/kernelDiedError.ts index 06502ea7ca4..a7d606d8dfa 100644 --- a/src/kernels/errors/kernelDiedError.ts +++ b/src/kernels/errors/kernelDiedError.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { KernelConnectionMetadata } from '../types'; -import { WrappedKernelError } from '../../platform/errors/types'; +import { WrappedKernelError } from './types'; export class KernelDiedError extends WrappedKernelError { constructor( diff --git a/src/kernels/errors/kernelErrorHandler.ts b/src/kernels/errors/kernelErrorHandler.ts index 8a3b975d6d8..bea5b163786 100644 --- a/src/kernels/errors/kernelErrorHandler.ts +++ b/src/kernels/errors/kernelErrorHandler.ts @@ -38,13 +38,7 @@ import { } from '../../platform/errors/errorUtils'; import { JupyterConnectError } from '../../platform/errors/jupyterConnectError'; import { JupyterKernelDependencyError } from './jupyterKernelDependencyError'; -import { - WrappedError, - BaseKernelError, - WrappedKernelError, - BaseError, - IDataScienceErrorHandler -} from '../../platform/errors/types'; +import { WrappedError, BaseError } from '../../platform/errors/types'; import { noop } from '../../platform/common/utils/misc'; import { EnvironmentType } from '../../platform/pythonEnvironments/info'; import { KernelDeadError } from './kernelDeadError'; @@ -62,6 +56,7 @@ import { computeServerId } from '../jupyter/jupyterUtils'; import { RemoteJupyterServerConnectionError } from '../../platform/errors/remoteJupyterServerConnectionError'; import { RemoteJupyterServerUriProviderError } from './remoteJupyterServerUriProviderError'; import { InvalidRemoteJupyterServerUriHandleError } from './invalidRemoteJupyterServerUriHandleError'; +import { BaseKernelError, IDataScienceErrorHandler, WrappedKernelError } from './types'; @injectable() export class DataScienceErrorHandler implements IDataScienceErrorHandler { diff --git a/src/kernels/errors/kernelInterruptTimeoutError.ts b/src/kernels/errors/kernelInterruptTimeoutError.ts index dfc5799c9f5..5c2f9726582 100644 --- a/src/kernels/errors/kernelInterruptTimeoutError.ts +++ b/src/kernels/errors/kernelInterruptTimeoutError.ts @@ -3,7 +3,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class KernelInterruptTimeoutError extends BaseKernelError { constructor(kernelConnection: KernelConnectionMetadata) { diff --git a/src/kernels/errors/kernelPortNotUsedTimeoutError.ts b/src/kernels/errors/kernelPortNotUsedTimeoutError.ts index 6a389167b5e..18babdca02f 100644 --- a/src/kernels/errors/kernelPortNotUsedTimeoutError.ts +++ b/src/kernels/errors/kernelPortNotUsedTimeoutError.ts @@ -4,7 +4,7 @@ import { DataScience } from '../../platform/common/utils/localize'; import { getDisplayNameOrNameOfKernelConnection } from '../helpers'; import { KernelConnectionMetadata } from '../types'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class KernelPortNotUsedTimeoutError extends BaseKernelError { constructor(kernelConnection: KernelConnectionMetadata) { diff --git a/src/kernels/errors/kernelProcessExitedError.ts b/src/kernels/errors/kernelProcessExitedError.ts index 3497d9cb0d2..477ee9d3582 100644 --- a/src/kernels/errors/kernelProcessExitedError.ts +++ b/src/kernels/errors/kernelProcessExitedError.ts @@ -3,7 +3,7 @@ import { KernelConnectionMetadata } from '../types'; import { DataScience } from '../../platform/common/utils/localize'; -import { BaseKernelError } from '../../platform/errors/types'; +import { BaseKernelError } from './types'; export class KernelProcessExitedError extends BaseKernelError { constructor( diff --git a/src/kernels/errors/types.ts b/src/kernels/errors/types.ts new file mode 100644 index 00000000000..c07f952a9ea --- /dev/null +++ b/src/kernels/errors/types.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { + KernelAction, + KernelActionSource, + KernelConnectionMetadata, + KernelInterpreterDependencyResponse +} from '../../kernels/types'; +import { Resource } from '../../platform/common/types'; +import { BaseError, ErrorCategory, WrappedError } from '../../platform/errors/types'; + +export const IDataScienceErrorHandler = Symbol('IDataScienceErrorHandler'); +export interface IDataScienceErrorHandler { + /** + * Handles the errors and if necessary displays an error message. + */ + handleError(err: Error): Promise; + /** + * Handles errors specific to kernels. + * The value of `errorContext` is used to determine the context of the error message, whether it applies to starting or interrupting kernels or the like. + * Thus based on the context the error message would be different. + */ + handleKernelError( + err: Error, + errorContext: KernelAction, + kernelConnection: KernelConnectionMetadata, + resource: Resource, + actionSource: KernelActionSource + ): Promise; + /** + * The value of `errorContext` is used to determine the context of the error message, whether it applies to starting or interrupting kernels or the like. + * Thus based on the context the error message would be different. + */ + getErrorMessageForDisplayInCell(err: Error, errorContext: KernelAction): Promise; +} + +export abstract class BaseKernelError extends BaseError { + public override stdErr?: string; + constructor( + category: ErrorCategory, + message: string, + public readonly kernelConnectionMetadata: KernelConnectionMetadata + ) { + super(category, message); + } +} + +export class WrappedKernelError extends WrappedError { + constructor( + message: string, + originalException: Error | undefined, + public readonly kernelConnectionMetadata: KernelConnectionMetadata + ) { + super(message, originalException); + } +} diff --git a/src/kernels/jupyter/serverSelector.ts b/src/kernels/jupyter/serverSelector.ts index 795c8dce7b6..ea1be510a83 100644 --- a/src/kernels/jupyter/serverSelector.ts +++ b/src/kernels/jupyter/serverSelector.ts @@ -24,7 +24,7 @@ import { IJupyterServerUriStorage, JupyterServerUriHandle } from './types'; -import { IDataScienceErrorHandler } from '../../platform/errors/types'; +import { IDataScienceErrorHandler } from '../errors/types'; import { IConfigurationService, IsWebExtension } from '../../platform/common/types'; import { handleExpiredCertsError, diff --git a/src/kernels/jupyter/serviceRegistry.node.ts b/src/kernels/jupyter/serviceRegistry.node.ts index cdd24c66b5a..9addf7acd30 100644 --- a/src/kernels/jupyter/serviceRegistry.node.ts +++ b/src/kernels/jupyter/serviceRegistry.node.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../../platform/activation/types'; -import { IDataScienceErrorHandler } from '../../platform/errors/types'; import { IServiceManager } from '../../platform/ioc/types'; import { DataScienceErrorHandler } from '../errors/kernelErrorHandler'; +import { IDataScienceErrorHandler } from '../errors/types'; import { IRemoteKernelFinder } from '../raw/types'; import { INotebookProvider } from '../types'; import { JupyterCommandLineSelectorCommand } from './commands/commandLineSelector'; diff --git a/src/kernels/jupyter/serviceRegistry.web.ts b/src/kernels/jupyter/serviceRegistry.web.ts index 43e405713fa..5f556bc7cf9 100644 --- a/src/kernels/jupyter/serviceRegistry.web.ts +++ b/src/kernels/jupyter/serviceRegistry.web.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../../platform/activation/types'; -import { IDataScienceErrorHandler } from '../../platform/errors/types'; import { IServiceManager } from '../../platform/ioc/types'; import { DataScienceErrorHandler } from '../errors/kernelErrorHandler'; +import { IDataScienceErrorHandler } from '../errors/types'; import { IRemoteKernelFinder } from '../raw/types'; import { INotebookProvider } from '../types'; import { JupyterCommandLineSelectorCommand } from './commands/commandLineSelector'; diff --git a/src/notebooks/controllers/kernelConnector.ts b/src/notebooks/controllers/kernelConnector.ts index e72db0cbd9a..cda63e9fc80 100644 --- a/src/notebooks/controllers/kernelConnector.ts +++ b/src/notebooks/controllers/kernelConnector.ts @@ -27,8 +27,8 @@ import { Product } from '../../kernels/installer/types'; import { INotebookControllerManager, INotebookEditorProvider } from '../types'; import { selectKernel } from './kernelSelector'; import { KernelDeadError } from '../../kernels/errors/kernelDeadError'; +import { IDataScienceErrorHandler } from '../../kernels/errors/types'; import { noop } from '../../platform/common/utils/misc'; -import { IDataScienceErrorHandler } from '../../platform/errors/types'; import { IStatusProvider } from '../../platform/progress/types'; import { IRawNotebookProvider } from '../../kernels/raw/types'; import { IVSCodeNotebookController } from './types'; diff --git a/src/notebooks/controllers/vscodeNotebookController.ts b/src/notebooks/controllers/vscodeNotebookController.ts index 30aa1e819c5..5769b806892 100644 --- a/src/notebooks/controllers/vscodeNotebookController.ts +++ b/src/notebooks/controllers/vscodeNotebookController.ts @@ -54,7 +54,7 @@ import { IServiceContainer } from '../../platform/ioc/types'; import { EnvironmentType } from '../../platform/pythonEnvironments/info'; import { Commands } from '../../platform/common/constants'; import { Telemetry } from '../../telemetry'; -import { IDataScienceErrorHandler, WrappedError } from '../../platform/errors/types'; +import { WrappedError } from '../../platform/errors/types'; import { IPyWidgetMessages } from '../../platform/messageTypes'; import { getKernelConnectionPath, @@ -90,6 +90,7 @@ import { import { KernelMessage } from '@jupyterlab/services'; import { initializeInteractiveOrNotebookTelemetryBasedOnUserAction } from '../../kernels/telemetry/helper'; import { NotebookCellLanguageService } from '../languages/cellLanguageService'; +import { IDataScienceErrorHandler } from '../../kernels/errors/types'; import { sendNotebookOrKernelLanguageTelemetry } from '../telemetry/notebookOrKernelLanguageTelemetry'; export class VSCodeNotebookController implements Disposable, IVSCodeNotebookController { diff --git a/src/notebooks/notebookCommandListener.ts b/src/notebooks/notebookCommandListener.ts index 8005ab06a00..838a1f21b63 100644 --- a/src/notebooks/notebookCommandListener.ts +++ b/src/notebooks/notebookCommandListener.ts @@ -27,11 +27,11 @@ import { traceInfoIfCI, traceInfo } from '../platform/logging'; import { sendTelemetryEvent, Telemetry } from '../telemetry'; import { trackKernelResourceInformation } from '../kernels/telemetry/helper'; import { INotebookControllerManager, INotebookEditorProvider } from './types'; -import { IDataScienceErrorHandler } from '../platform/errors/types'; import { IServiceContainer } from '../platform/ioc/types'; import { endCellAndDisplayErrorsInCell } from '../kernels/execution/helpers'; import { chainWithPendingUpdates } from '../kernels/execution/notebookUpdater'; import { getAssociatedNotebookDocument } from '../kernels/helpers'; +import { IDataScienceErrorHandler } from '../kernels/errors/types'; import { getNotebookMetadata } from '../platform/common/utils'; import { KernelConnector } from './controllers/kernelConnector'; diff --git a/src/platform/common/utils.ts b/src/platform/common/utils.ts index 019662cc377..a632924e3ee 100644 --- a/src/platform/common/utils.ts +++ b/src/platform/common/utils.ts @@ -15,7 +15,7 @@ import { traceError, traceInfo } from '../logging'; import { ICell } from './types'; import { DataScience } from './utils/localize'; -import { IJupyterKernelSpec } from '../../webviews/extension-side/api/extension'; +import { IJupyterKernelSpec } from '../../kernels/types'; // Can't figure out a better way to do this. Enumerate // the allowed keys of different output formats. diff --git a/src/platform/errors/types.ts b/src/platform/errors/types.ts index 0ad30d77f25..6b6024356bd 100644 --- a/src/platform/errors/types.ts +++ b/src/platform/errors/types.ts @@ -1,14 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { - KernelAction, - KernelActionSource, - KernelConnectionMetadata, - KernelInterpreterDependencyResponse -} from '../../kernels/types'; -import { Resource } from '../common/types'; - export abstract class BaseError extends Error { public stdErr?: string; constructor(public readonly category: ErrorCategory, message: string) { @@ -16,17 +8,6 @@ export abstract class BaseError extends Error { } } -export abstract class BaseKernelError extends BaseError { - public override stdErr?: string; - constructor( - category: ErrorCategory, - message: string, - public readonly kernelConnectionMetadata: KernelConnectionMetadata - ) { - super(category, message); - } -} - /** * Wraps an error with a custom error message, retaining the call stack information. */ @@ -61,15 +42,6 @@ export class WrappedError extends BaseError { return err; } } -export class WrappedKernelError extends WrappedError { - constructor( - message: string, - originalException: Error | undefined, - public readonly kernelConnectionMetadata: KernelConnectionMetadata - ) { - super(message, originalException); - } -} export function getErrorCategory(error?: Error): ErrorCategory { if (!error) { @@ -134,28 +106,3 @@ export type TelemetryErrorProperties = { */ pythonErrorPackage?: string; }; - -export const IDataScienceErrorHandler = Symbol('IDataScienceErrorHandler'); -export interface IDataScienceErrorHandler { - /** - * Handles the errors and if necessary displays an error message. - */ - handleError(err: Error): Promise; - /** - * Handles errors specific to kernels. - * The value of `errorContext` is used to determine the context of the error message, whether it applies to starting or interrupting kernels or the like. - * Thus based on the context the error message would be different. - */ - handleKernelError( - err: Error, - errorContext: KernelAction, - kernelConnection: KernelConnectionMetadata, - resource: Resource, - actionSource: KernelActionSource - ): Promise; - /** - * The value of `errorContext` is used to determine the context of the error message, whether it applies to starting or interrupting kernels or the like. - * Thus based on the context the error message would be different. - */ - getErrorMessageForDisplayInCell(err: Error, errorContext: KernelAction): Promise; -} diff --git a/src/test/datascience/data-viewing/dataViewer.unit.test.ts b/src/test/datascience/data-viewing/dataViewer.unit.test.ts index c046eb44a1a..d766ee507ad 100644 --- a/src/test/datascience/data-viewing/dataViewer.unit.test.ts +++ b/src/test/datascience/data-viewing/dataViewer.unit.test.ts @@ -16,7 +16,7 @@ import { WorkspaceService } from '../../../platform/common/application/workspace import { JupyterSettings } from '../../../platform/common/configSettings'; import { ConfigurationService } from '../../../platform/common/configuration/service.node'; import { IConfigurationService, IExtensionContext } from '../../../platform/common/types'; -import { IDataScienceErrorHandler } from '../../../platform/errors/types'; +import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; import { DataViewer } from '../../../webviews/extension-side/dataviewer/dataViewer'; import { JupyterVariableDataProvider } from '../../../webviews/extension-side/dataviewer/jupyterVariableDataProvider'; import { IDataViewer, IDataViewerDataProvider } from '../../../webviews/extension-side/dataviewer/types'; diff --git a/src/test/datascience/editor-integration/codewatcher.unit.test.ts b/src/test/datascience/editor-integration/codewatcher.unit.test.ts index 81bbc15d817..5bc73da2884 100644 --- a/src/test/datascience/editor-integration/codewatcher.unit.test.ts +++ b/src/test/datascience/editor-integration/codewatcher.unit.test.ts @@ -42,10 +42,10 @@ import { InteractiveCellResultError } from '../../../platform/errors/interactive import { ICodeWatcher, IGeneratedCodeStorageFactory } from '../../../interactive-window/editor-integration/types'; import { IInteractiveWindowProvider, IInteractiveWindow } from '../../../interactive-window/types'; import { Commands, EditorContexts } from '../../../platform/common/constants'; -import { IDataScienceErrorHandler } from '../../../platform/errors/types'; import { SystemVariables } from '../../../platform/common/variables/systemVariables.node'; import { IDebugLocationTracker } from '../../../kernels/debugger/types'; import { noop } from '../../core'; +import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts b/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts index ef3640a692f..ea07d45f203 100644 --- a/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts +++ b/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts @@ -39,7 +39,7 @@ import { uninstallIPyKernel } from '../../helpers.node'; import { INotebookControllerManager } from '../../../../notebooks/types'; -import { BaseKernelError, WrappedError } from '../../../../platform/errors/types'; +import { WrappedError } from '../../../../platform/errors/types'; import { clearInstalledIntoInterpreterMemento } from '../../../../kernels/installer/productInstaller'; import { ProductNames } from '../../../../kernels/installer/productNames'; import { Product, IInstaller, InstallerResponse } from '../../../../kernels/installer/types'; @@ -68,6 +68,7 @@ import { getDisplayPathFromLocalFile } from '../../../../platform/common/platfor import { getOSType, OSType } from '../../../../platform/common/utils/platform'; import { isUri } from '../../../../platform/common/utils/misc'; import { hasErrorOutput, translateCellErrorOutput } from '../../../../kernels/execution/helpers'; +import { BaseKernelError } from '../../../../kernels/errors/types'; /* eslint-disable no-invalid-this, , , @typescript-eslint/no-explicit-any */ suite('DataScience Install IPyKernel (slow) (install)', function () { diff --git a/src/webviews/extension-side/dataviewer/dataViewer.ts b/src/webviews/extension-side/dataviewer/dataViewer.ts index df72c39e36b..cb63fbba6b7 100644 --- a/src/webviews/extension-side/dataviewer/dataViewer.ts +++ b/src/webviews/extension-side/dataviewer/dataViewer.ts @@ -39,12 +39,12 @@ import { } from '../../../platform/common/types'; import * as localize from '../../../platform/common/utils/localize'; import { StopWatch } from '../../../platform/common/utils/stopWatch'; -import { IDataScienceErrorHandler } from '../../../platform/errors/types'; import { Telemetry } from '../../webview-side/common/constants'; import { WebViewViewChangeEventArgs } from '../types'; import { WebviewPanelHost } from '../webviewPanelHost'; import { noop } from '../../../platform/common/utils/misc'; import { joinPath } from '../../../platform/vscode-path/resources'; +import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; const PREFERRED_VIEWGROUP = 'JupyterDataViewerPreferredViewColumn'; @injectable() diff --git a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts index 8c95b15afeb..1eb0bc69f03 100644 --- a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts +++ b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts @@ -22,12 +22,12 @@ import { IConfigurationService, IDisposableRegistry } from '../../../platform/co import { DataScience } from '../../../platform/common/utils/localize'; import { noop } from '../../../platform/common/utils/misc'; import { untildify } from '../../../platform/common/utils/platform'; -import { IDataScienceErrorHandler } from '../../../platform/errors/types'; import { IInterpreterService } from '../../../platform/interpreter/contracts'; import { traceError } from '../../../platform/logging'; import { IShowDataViewerFromVariablePanel } from '../../../platform/messageTypes'; import { sendTelemetryEvent } from '../../../telemetry'; import { EventName } from '../../../telemetry/constants'; +import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; import { DataViewerChecker } from './dataViewerChecker'; import { IDataViewerDependencyService, IDataViewerFactory, IJupyterVariableDataProviderFactory } from './types'; diff --git a/src/webviews/extension-side/import-export/jupyterExporter.ts b/src/webviews/extension-side/import-export/jupyterExporter.ts index 8a880d19e1f..117733c5c03 100644 --- a/src/webviews/extension-side/import-export/jupyterExporter.ts +++ b/src/webviews/extension-side/import-export/jupyterExporter.ts @@ -12,11 +12,11 @@ import { IFileSystem } from '../../../platform/common/platform/types'; import { ICell, IConfigurationService } from '../../../platform/common/types'; import { pruneCell } from '../../../platform/common/utils'; import { DataScience } from '../../../platform/common/utils/localize'; -import { IDataScienceErrorHandler } from '../../../platform/errors/types'; import { defaultNotebookFormat } from '../../../platform/common/constants'; import { INotebookExporter, IJupyterExecution } from '../../../kernels/jupyter/types'; import { openAndShowNotebook } from '../../../platform/common/utils/notebooks'; import { noop } from '../../../platform/common/utils/misc'; +import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; @injectable() export class JupyterExporter implements INotebookExporter {