Commit 354b0b14 authored by yann300's avatar yann300

modal alert if error

parent 4cb52639
...@@ -247,10 +247,14 @@ export class LandingPage extends ViewPlugin { ...@@ -247,10 +247,14 @@ export class LandingPage extends ViewPlugin {
(loadingMsg) => { tooltip(loadingMsg) }, (loadingMsg) => { tooltip(loadingMsg) },
(error, content, cleanUrl, type, url) => { (error, content, cleanUrl, type, url) => {
if (error) { if (error) {
modalDialogCustom.alert(error) modalDialogCustom.alert(error.message || error)
} else { } else {
fileProviders.browser.addExternal(type + '/' + cleanUrl, content, url) try {
fileProviders.workspace.addExternal(type + '/' + cleanUrl, content, url)
this.verticalIcons.select('fileExplorers') this.verticalIcons.select('fileExplorers')
} catch (e) {
modalDialogCustom.alert(e.message)
}
} }
} }
) )
......
...@@ -60,6 +60,8 @@ function GistHandler (_window) { ...@@ -60,6 +60,8 @@ function GistHandler (_window) {
if (!errorLoadingFile) { if (!errorLoadingFile) {
const provider = fileManager.getProvider('workspace') const provider = fileManager.getProvider('workspace')
provider.lastLoadedGistId = gistId provider.lastLoadedGistId = gistId
} else {
modalDialogCustom.alert(errorLoadingFile.message || errorLoadingFile)
} }
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment