Skip to content

Commit

Permalink
Different error messages for timeouts (#13582)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored May 28, 2023
1 parent 56efedd commit 80fdf24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/kernels/errors/kernelPortNotUsedTimeoutError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export class KernelPortNotUsedTimeoutError extends BaseKernelError {
constructor(kernelConnection: KernelConnectionMetadata) {
super(
'timeout',
DataScience.rawKernelStartFailedDueToTimeout(getDisplayNameOrNameOfKernelConnection(kernelConnection)),
DataScience.rawKernelStartFailedDueToTimeoutWaitingForPort(
getDisplayNameOrNameOfKernelConnection(kernelConnection)
),
kernelConnection
);
}
Expand Down
11 changes: 10 additions & 1 deletion src/platform/common/utils/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,16 @@ export namespace DataScience {
export const rawKernelStartFailedDueToTimeout = (kernelName: string) =>
l10n.t({
message:
"Unable to start Kernel '{0}' due to connection timeout. \nView Jupyter [log](command:jupyter.viewOutput) for further details.",
"Unable to start Kernel '{0}' due to a connection timeout. \nView Jupyter [log](command:jupyter.viewOutput) for further details.",
args: [kernelName],
comment: [
'Do not translate the text "command:jupyter.viewOutput", that is a command Id that will be used by VS Code to open the output panel'
]
});
export const rawKernelStartFailedDueToTimeoutWaitingForPort = (kernelName: string) =>
l10n.t({
message:
"Unable to start Kernel '{0}' due to a timeout waiting for the ports to get used. \nView Jupyter [log](command:jupyter.viewOutput) for further details.",
args: [kernelName],
comment: [
'Do not translate the text "command:jupyter.viewOutput", that is a command Id that will be used by VS Code to open the output panel'
Expand Down

0 comments on commit 80fdf24

Please sign in to comment.