diff --git a/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts b/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts index a86f18bf126..1fe0b669a8c 100644 --- a/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts +++ b/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts @@ -595,7 +595,7 @@ export function SharedLinearPileupDisplayMixin( } } catch (e) { console.error(e) - session.notify(`${e}`, 'error') + session.notifyError(`${e}`, e) } }), ) diff --git a/plugins/breakpoint-split-view/src/BreakpointSplitView/model.ts b/plugins/breakpoint-split-view/src/BreakpointSplitView/model.ts index b31d4029595..dae654075b7 100644 --- a/plugins/breakpoint-split-view/src/BreakpointSplitView/model.ts +++ b/plugins/breakpoint-split-view/src/BreakpointSplitView/model.ts @@ -351,7 +351,7 @@ export default function stateModelFactory(pluginManager: PluginManager) { ) } catch (e) { console.error(e) - getSession(self).notify(`${e}`, 'error') + getSession(self).notifyError(`${e}`, e) } }), ) diff --git a/plugins/data-management/src/ucsc-trackhub/doConnect.ts b/plugins/data-management/src/ucsc-trackhub/doConnect.ts index 3f73f302fc8..4eb1b02c247 100644 --- a/plugins/data-management/src/ucsc-trackhub/doConnect.ts +++ b/plugins/data-management/src/ucsc-trackhub/doConnect.ts @@ -132,7 +132,7 @@ export async function doConnect(self: any) { } } catch (e) { console.error(e) - session.notify(`${getConf(self, 'name')}: "${e}"`, 'error') + session.notifyError(`${getConf(self, 'name')}: "${e}"`, e) session.breakConnection?.(self.configuration) } } diff --git a/plugins/dotplot-view/src/LaunchDotplotView.ts b/plugins/dotplot-view/src/LaunchDotplotView.ts index 99781be0ad4..ba97799d0ff 100644 --- a/plugins/dotplot-view/src/LaunchDotplotView.ts +++ b/plugins/dotplot-view/src/LaunchDotplotView.ts @@ -39,7 +39,7 @@ export default function LaunchDotplotView(pluginManager: PluginManager) { ) } } catch (e) { - session.notify(`${e}`, 'error') + session.notifyError(`${e}`, e) throw e } }, diff --git a/plugins/legacy-jbrowse/src/JBrowse1Connection/model.ts b/plugins/legacy-jbrowse/src/JBrowse1Connection/model.ts index 3c5e147bf04..ee86b264815 100644 --- a/plugins/legacy-jbrowse/src/JBrowse1Connection/model.ts +++ b/plugins/legacy-jbrowse/src/JBrowse1Connection/model.ts @@ -55,9 +55,9 @@ export default function (pluginManager: PluginManager) { self.setTrackConfs(jb2Tracks) } catch (error) { console.error(error) - session.notify( + session.notifyError( `There was a problem connecting to the JBrowse 1 data directory "${self.name}". Please make sure you have entered a valid location. The error that was thrown is: "${error}"`, - 'error', + error, ) session.breakConnection?.(self.configuration) } diff --git a/plugins/linear-comparative-view/src/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.tsx b/plugins/linear-comparative-view/src/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.tsx index 94c77ee68e4..aae9026be43 100644 --- a/plugins/linear-comparative-view/src/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.tsx +++ b/plugins/linear-comparative-view/src/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.tsx @@ -69,7 +69,8 @@ export default function LaunchSyntenyViewDialog({ model, }) } catch (e) { - getSession(model).notify(`${e}`, 'error') + console.error(e) + getSession(model).notifyError(`${e}`, e) } })() handleClose() diff --git a/plugins/linear-comparative-view/src/LaunchLinearSyntenyView.ts b/plugins/linear-comparative-view/src/LaunchLinearSyntenyView.ts index f86cbca3458..4e7d11302f0 100644 --- a/plugins/linear-comparative-view/src/LaunchLinearSyntenyView.ts +++ b/plugins/linear-comparative-view/src/LaunchLinearSyntenyView.ts @@ -67,7 +67,7 @@ export default function LaunchLinearSyntenyView(pluginManager: PluginManager) { ) } } catch (e) { - session.notify(`${e}`, 'error') + session.notifyError(`${e}`, e) throw e } }, diff --git a/plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/SyntenyContextMenu.tsx b/plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/SyntenyContextMenu.tsx index d1ada8428c4..2c3a0077fd5 100644 --- a/plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/SyntenyContextMenu.tsx +++ b/plugins/linear-comparative-view/src/LinearSyntenyDisplay/components/SyntenyContextMenu.tsx @@ -62,13 +62,13 @@ export default function SyntenyContextMenu({ .navToLocString(`${refName}:${start}-${end}`) .catch(e => { console.error(e) - getSession(model).notify(`${e}`, 'error') + getSession(model).notifyError(`${e}`, e) }) view.views[1] .navToLocString(`${mate.refName}:${mate.start}-${mate.end}`) .catch(e => { console.error(e) - getSession(model).notify(`${e}`, 'error') + getSession(model).notifyError(`${e}`, e) }) }, }, diff --git a/plugins/spreadsheet-view/src/SpreadsheetView/models/ColumnDataTypes/LocString.tsx b/plugins/spreadsheet-view/src/SpreadsheetView/models/ColumnDataTypes/LocString.tsx index 742c4231b50..77d4783ee38 100644 --- a/plugins/spreadsheet-view/src/SpreadsheetView/models/ColumnDataTypes/LocString.tsx +++ b/plugins/spreadsheet-view/src/SpreadsheetView/models/ColumnDataTypes/LocString.tsx @@ -302,7 +302,7 @@ const DataCellReactComponent = observer(function ({ await locationLinkClick(spreadsheet, columnNumber, cell) } catch (e) { console.error(e) - session.notify(`${e}`, 'error') + session.notifyError(`${e}`, e) } }} title="open a new linear genome view here" diff --git a/products/jbrowse-desktop/src/rootModel/Menus.ts b/products/jbrowse-desktop/src/rootModel/Menus.ts index 0379ffe23b6..849c862862a 100644 --- a/products/jbrowse-desktop/src/rootModel/Menus.ts +++ b/products/jbrowse-desktop/src/rootModel/Menus.ts @@ -54,7 +54,7 @@ export function DesktopMenusMixin(_pluginManager: PluginManager) { } } catch (e) { console.error(e) - self.session?.notify(`${e}`, 'error') + self.session?.notifyError(`${e}`, e) } }, }, @@ -67,7 +67,7 @@ export function DesktopMenusMixin(_pluginManager: PluginManager) { await self.saveSession(getSaveSession(self)) } catch (e) { console.error(e) - self.session?.notify(`${e}`, 'error') + self.session?.notifyError(`${e}`, e) } } }, @@ -84,7 +84,7 @@ export function DesktopMenusMixin(_pluginManager: PluginManager) { await self.saveSession(getSaveSession(self)) } catch (e) { console.error(e) - self.session?.notify(`${e}`, 'error') + self.session?.notifyError(`${e}`, e) } }, }, @@ -110,7 +110,7 @@ export function DesktopMenusMixin(_pluginManager: PluginManager) { }) } catch (e) { console.error(e) - self.session?.notify(`${e}`) + self.session?.notifyError(`${e}`, e) } doneCallback() },