mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add more detailed error reporting around invalid projects
This commit is contained in:
parent
b74ba141d1
commit
59b2401c2c
3 changed files with 31 additions and 6 deletions
|
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue