mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Improve error message when a partition target doesn't exist.
Closes #46
This commit is contained in:
parent
2c188738e6
commit
116be16392
1 changed files with 7 additions and 4 deletions
|
|
@ -78,11 +78,14 @@ impl VfsWatcher {
|
||||||
let (tx, rx) = mpsc::channel();
|
let (tx, rx) = mpsc::channel();
|
||||||
|
|
||||||
let mut watcher: RecommendedWatcher = Watcher::new(tx, Duration::from_secs(1))
|
let mut watcher: RecommendedWatcher = Watcher::new(tx, Duration::from_secs(1))
|
||||||
.expect("Unable to create watcher!");
|
.expect("Unable to create watcher! This is a bug in Rojo.");
|
||||||
|
|
||||||
watcher
|
match watcher.watch(&root_path, RecursiveMode::Recursive) {
|
||||||
.watch(&root_path, RecursiveMode::Recursive)
|
Ok(_) => (),
|
||||||
.expect("Unable to watch path!");
|
Err(_) => {
|
||||||
|
panic!("Unable to watch partition {}, with path {}! Make sure that it's a file or directory.", partition_name, root_path.display());
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
watchers.push(watcher);
|
watchers.push(watcher);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue