mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
Add more detailed error reporting around invalid projects
This commit is contained in:
@@ -13,7 +13,7 @@ pub enum ProjectLoadError {
|
||||
DidNotExist,
|
||||
FailedToOpen,
|
||||
FailedToRead,
|
||||
Invalid,
|
||||
InvalidJson(serde_json::Error),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -116,7 +116,7 @@ impl Project {
|
||||
|
||||
match serde_json::from_str(&contents) {
|
||||
Ok(v) => Ok(v),
|
||||
Err(_) => return Err(ProjectLoadError::Invalid),
|
||||
Err(e) => return Err(ProjectLoadError::InvalidJson(e)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user