[−][src]Macro nom::add_return_error 
Add an error if the child parser fails
While error! does an early return and avoids backtracking, add_return_error! backtracks normally. It just provides more context for an error
    named!(err_test, add_return_error!(ErrorKind::Custom(42), tag!("abcd")));
    let a = &b"efghblah"[..];
    let res_a = err_test(a);
    assert_eq!(res_a, Error(error_node_position!(ErrorKind::Custom(42), a, error_position!(ErrorKind::Tag, a))));