Use ParserError::with_cause() and build new ParserError object
This commit is contained in:
parent
3a76c05317
commit
b6c1a6301f
1 changed files with 4 additions and 1 deletions
|
@ -111,7 +111,10 @@ impl<HP> Parser<HP> where
|
|||
|
||||
if divided.is_err() {
|
||||
debug!("Error reading into internal datastructure");
|
||||
return Err(divided.err().unwrap());
|
||||
let mut p = ParserError::new("Dividing text failed",
|
||||
s, 0,
|
||||
"Dividing text with divide_text() failed");
|
||||
return Err(p.with_cause(Box::new(divided.err().unwrap())));
|
||||
}
|
||||
|
||||
let (header, data) = divided.ok().unwrap();
|
||||
|
|
Loading…
Reference in a new issue