Improve file watcher error msg (#12060)

# Objective

When dealing with custom asset sources it can be a bit tricky to get
asset roots combined with relative paths correct.
It's even harder when it isn't mentioned which path was problematic.

## Solution

Mention which path failed for the file watcher.

Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
Co-authored-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
This commit is contained in:
Torstein Grindvik 2024-02-23 18:39:33 +01:00 committed by GitHub
parent c641882cfe
commit 54e2b2ea07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -490,7 +490,9 @@ impl AssetSource {
sender,
file_debounce_wait_time,
)
.expect("Failed to create file watcher"),
.unwrap_or_else(|e| {
panic!("Failed to create file watcher from path {path:?}, {e:?}")
}),
));
#[cfg(any(
not(feature = "file_watcher"),