Commit cd71a4b1 authored by yann300's avatar yann300 Committed by Aniket

remove uneeded try/catch

parent f98da27f
...@@ -168,19 +168,11 @@ class FileManager extends Plugin { ...@@ -168,19 +168,11 @@ class FileManager extends Plugin {
* @returns {void} * @returns {void}
*/ */
async open (path) { async open (path) {
try {
path = this.limitPluginScope(path) path = this.limitPluginScope(path)
try {
path = this.getPathFromUrl(path).file path = this.getPathFromUrl(path).file
} catch (e) {
throw e
}
await this._handleExists(path, `Cannot open file ${path}`) await this._handleExists(path, `Cannot open file ${path}`)
await this._handleIsFile(path, `Cannot open file ${path}`) await this._handleIsFile(path, `Cannot open file ${path}`)
await this.openFile(path) await this.openFile(path)
} catch (e) {
throw e
}
} }
/** /**
...@@ -608,12 +600,8 @@ class FileManager extends Plugin { ...@@ -608,12 +600,8 @@ class FileManager extends Plugin {
} else { } else {
this.saveCurrentFile() this.saveCurrentFile()
let resolved let resolved
try {
resolved = this.getPathFromUrl(file) resolved = this.getPathFromUrl(file)
file = resolved.file file = resolved.file
} catch (e) {
throw e
}
const provider = resolved.provider const provider = resolved.provider
this._deps.config.set('currentFile', file) this._deps.config.set('currentFile', file)
this.openedFiles[file] = file this.openedFiles[file] = file
......
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