Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Bugfix: FileSystemWatcher - crash when there is an error #2142

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Apr 26, 2018

Issue: On Windows, I noticed that when I built the unit tests, Oni would crash and just show a blank screen.

Defect: chokidar was emitting several error events around the fileysystem, for exampe:

events.js:182 Uncaught Error: EPERM: operation not permitted, lstat 'E:\oni\lib_test\browser\src\Input'

This was easy to repro on Windows by running npm run test:unit:browser while the E:/oni directory was the active workspace, or by deleting the lib_test folder.

Fix: Handle the 'error' event and log out warnings. These aren't usually actionable for us, and are just noise - for example, it's expected when the lib_test folder is deleted that you'd get an error trying to access a subdirectory, and we don't need to do anything special. However, handling the error event means it doesn't bubble up and crash the editor.

@codecov
Copy link

codecov bot commented Apr 26, 2018

Codecov Report

Merging #2142 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2142   +/-   ##
=======================================
  Coverage   36.83%   36.83%           
=======================================
  Files         293      293           
  Lines       11982    11982           
  Branches     1582     1582           
=======================================
  Hits         4414     4414           
  Misses       7320     7320           
  Partials      248      248

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bc376b...80a98c8. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant