test: add basic error handling for element · feakin/feakin-web@9e0f656 · GitHub
Skip to content

Commit 9e0f656

Browse files
committed
test: add basic error handling for element
1 parent 9d43523 commit 9e0f656

3 files changed

Lines changed: 47 additions & 12 deletions

File tree

‎crates/fkl_parser/src/lib.rs‎

Lines changed: 1 addition & 0 deletions

‎crates/fkl_parser/src/parser/parse_result.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ pub enum ErrorKind {
2222

2323
#[derive(Debug)]
2424
pub struct ParseError {
25-
/// Kind of error
2625
pub kind: ErrorKind,
2726
source: Option<Box<dyn StdError + Sync + Send>>,
2827
}
2928

30-
3129
impl fmt::Display for ParseError {
3230
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3331
match &self.kind {
34-
ErrorKind::Msg(ref message) => write!(f, "{:?}", message),
35-
// ErrorKind::Json(ref e) => write!(f, "{}", e),
32+
ErrorKind::Msg(ref message) => write!(f, "{}", message),
3633
ErrorKind::Io(ref io_error) => {
3734
write!(f, "Io error while writing rendered value to output: {:?}", io_error)
3835
}

‎crates/fkl_parser/src/parser/parser.rs‎

Lines changed: 45 additions & 8 deletions

0 commit comments

Comments
 (0)