-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate execution failure (#14918)
* In Kernel API exec return output metadata along with output items * oops * wip * Propagate Kernel Exec errors upto 3rd party extension * oops * Found * Misc * Misc * Misc * Fix formatting * Fix tests * Fix tests * Misc * Revert changes * Fixes * Fixes * wip * Fixes * Fix tests * oops
- Loading branch information
1 parent
f89536b
commit 9c38e5b
Showing
12 changed files
with
274 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import type { IErrorMsg, IReplyErrorContent } from '@jupyterlab/services/lib/kernel/messages'; | ||
|
||
export class KernelError extends Error { | ||
public readonly ename: string; | ||
public readonly evalue: string; | ||
public readonly traceback: string[]; | ||
constructor(kernelError: IReplyErrorContent | IErrorMsg['content']) { | ||
super(kernelError.evalue || kernelError.ename); | ||
this.ename = kernelError.ename; | ||
this.evalue = kernelError.evalue; | ||
this.traceback = kernelError.traceback; | ||
} | ||
} |
Oops, something went wrong.