Ugly error message when trying to save a read-only file
- Dominant language
- Clojure
- Stars
- 915
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
If I try to save a file that is read-only on disk (tested on Windows 10), I get an ugly error dialog:
```
[Window Title]
Error
[Main Instruction]
A JavaScript error occurred in the main process
[Content]
Uncaught Exception:
Error: EPERM: operation not permitted, open 'C:\TFS\_Current\Horizon\_Documentation\Test.md'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
at Object.fs.writeFileSync (fs.js:1171:15)
at Object.markright.main.write_file_BANG_ (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2650:415)
at C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2675:258
at d (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2672:382)
at b (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:2673:330)
at Object.cljs.core.async.impl.ioc_helpers.run_state_machine (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:1947:333)
at Object.cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped (C:\Program Files (x86)\MarkRight\resources\app.asar\app.js:1948:116)
[OK]
```
This error situation should be handled in a more end-user-friendly dialog (something like "File could not be saved because it is write-protected.").
Contributor guide
Assessment
This issue has not been assessed yet.