From b8b16d2b5375b6b4b732c5a122e481b7c1100b85 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 25 Aug 2021 13:05:04 +0200 Subject: [PATCH] throw if getPathFromUrl fails --- apps/remix-ide/src/app/files/fileManager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index 959c1d75a7..e028148a08 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -173,13 +173,13 @@ class FileManager extends Plugin { try { path = this.getPathFromUrl(path).file } catch (e) { - return console.error(e) + throw e } await this._handleExists(path, `Cannot open file ${path}`) await this._handleIsFile(path, `Cannot open file ${path}`) await this.openFile(path) } catch (e) { - throw new Error(e) + throw e } } @@ -612,7 +612,7 @@ class FileManager extends Plugin { resolved = this.getPathFromUrl(file) file = resolved.file } catch (e) { - return console.error(e) + throw e } const provider = resolved.provider this._deps.config.set('currentFile', file)