Skip to content

Commit 08e4ceb

Browse files
committed
[feat] outsourcing ReaderError
1 parent 1e59c38 commit 08e4ceb

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

crates/package/src/enum/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod reader_error;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use std::path::PathBuf;
2+
use std::io;
3+
use serde_json;
4+
5+
#[derive(Debug)]
6+
pub enum ReaderError {
7+
JsonError {
8+
path: PathBuf,
9+
error: serde_json::Error,
10+
},
11+
ReadFeatureError {
12+
path: String,
13+
source: Box<ReaderError>,
14+
},
15+
ReadDirectoryError {
16+
path: PathBuf,
17+
error: io::Error,
18+
},
19+
ReadFileError {
20+
path: PathBuf,
21+
error: io::Error,
22+
},
23+
DirectoryEntryError(io::Error),
24+
}

0 commit comments

Comments
 (0)