Skip to content

Commit

Permalink
Improve file watcher error msg (bevyengine#12060)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
Co-authored-by: Torstein Grindvik <[email protected]>
  • Loading branch information
2 people authored and msvbg committed Feb 26, 2024
1 parent 1188337 commit e9ace51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_asset/src/io/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit e9ace51

Please sign in to comment.