ethereum / remix-project

Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
https://remix-ide.readthedocs.io
MIT License
2.47k stars 952 forks source link

handle error on file/folder creation in internal/external plugins #1028

Closed LianaHus closed 3 years ago

LianaHus commented 3 years ago

Currently, when internal/external plugins are trying to write/read in File Explorer, when no workspace available, the FileManager is not creating the file/folder but throwing an error. Our plugins are not handling this error but either doing nothing or printing an error in the console. No feedback to the user. I see 3 options:

  1. handle that it FileManager - simply create a workspace on demand
  2. handle that it FileManager - FilManager is auto-creating a new workspace when the last one is deleted
  3. update all internal/external plugins that writing a file/folder in File Manager and handle the error case by case
Aniket-Engg commented 3 years ago

Handle it in File Manager

yann300 commented 3 years ago

4 - handle that it FileManager - throw an exception to the plugin and display a toaster from remix UIR