Turn panics into errors in ServeSession

This commit is contained in:
Lucien Greathouse
2020-03-26 12:16:55 -07:00
parent 03c297190d
commit 729a7f0053
3 changed files with 45 additions and 20 deletions

View File

@@ -19,13 +19,13 @@ pub struct ProjectError(#[from] Error);
#[derive(Debug, Error)]
enum Error {
#[error("Rojo project I/O error")]
#[error(transparent)]
Io {
#[from]
source: io::Error,
},
#[error("Error parsing Rojo project")]
#[error("Error parsing Rojo project in path {}", .path.display())]
Json {
source: serde_json::Error,
path: PathBuf,