#3585: Canceled message when changing kernel (#4673)

* #3585: Canceled message when changing kernel

* Indentation

* Cleanup
This commit is contained in:
Raj
2019-03-27 15:43:27 -07:00
committed by GitHub
parent dd8922ce4d
commit 55efe76b2e

View File

@@ -230,13 +230,14 @@ export class CellModel implements ICellModel {
}
}
} catch (error) {
let message: string;
if (error.message === 'Canceled') {
// swallow the error
message = localize('executionCanceled', 'Query execution was canceled');
} else {
message = notebookUtils.getErrorMessage(error);
}
let message = notebookUtils.getErrorMessage(error);
this.sendNotification(notificationService, Severity.Error, message);
// TODO track error state for the cell
throw error;
} finally {
this.fireExecutionStateChanged();
}