We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e246581 commit 293c0d3Copy full SHA for 293c0d3
src/widgets/utils.ts
@@ -118,10 +118,20 @@ export async function injectCode({
118
});
119
const future = connection.requestExecute({
120
code: code,
121
- store_history: false
+ store_history: false,
122
+ stop_on_error: true,
123
+ silent: true,
124
+ allow_stdin: false
125
126
// TODO: Is there a better result to return?
- return (await future.done) as any;
127
+ const result = (await future.done) as any;
128
+ if (result.content.status === 'ok') {
129
+ return result.content.payload;
130
+ } else {
131
+ throw new Error(
132
+ `Execution status = ${result.status} not 'ok' traceback=${result.content.traceback}`
133
+ );
134
+ }
135
}
136
137
/**
0 commit comments