Previously the error message was UnboundLocalError now the message explains the issue.
This should not happen in normal use and is tricky to recover from because we can't watch a non-existent directory. But the message should at least explain what has happened.
Added some tests
Testing
Add tests for the cases of directory exists but no files and for directory deleted.
Acceptance Criteria
Open the live viewer
Deleted the directory that it is watching
coverage: 73.076% (+0.06%) from 73.019%
when pulling 5f1f961850e8c9b46f924f2bb7fcff64cd792977 on 2219-live-viewer-deleted-dir
into b866326c5c4d4e4a486415d5d12666e472c3defe on main.
coverage: 73.103% (+0.06%) from 73.045%
when pulling 28716cb27d001291ccb8a77755bef9697bf938c4 on 2219-live-viewer-deleted-dir
into 5e7c5a391bb8a7411e202d59c605d61a366d64c7 on main.
Issue
Closes #2219
Description
Previously the error message was
UnboundLocalError
now the message explains the issue.This should not happen in normal use and is tricky to recover from because we can't watch a non-existent directory. But the message should at least explain what has happened.
Added some tests
Testing
Add tests for the cases of directory exists but no files and for directory deleted.
Acceptance Criteria
Open the live viewer Deleted the directory that it is watching
Documentation
Release notes