New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public Expression::evaluate() returns private Error #67
Comments
As I run off to work, I'll point to the integration test, which should exercise it as a user would. I'm sure I need to document something better; perhaps we can figure out what that something is. |
surely ok()ping and unwrap()ing everything works for tests/quick&dirty, but in real code error inspection is of course useful.
anything would be a start 😉 but yeah, you can learn well from the integration tests if you find them (what i did) |
You started by saying
Which would imply that it is impossible to evaluate an expression. Is this true, or are you able to evaluate expressions, but the real problem is that the Perhaps I would understand better if you could include a small reproducible example of the code you've written and what you are trying to do. |
oh, sorry, of course it’s not impossible to evaluate and stringify the error, just handling it like i do with every other error type: use sxd_xpath::expression;
enum Error {
XPath(expression::Error),
Stuff(SomeOtherError),
}
impl From<expression::Error> for Error {...}
impl From<SomeOtherError> for Error {...}
...
let value = try!(xpath.evaluate(&context)); |
the expression crate is private
so if i’m not missing something, this crate is actually unusable for its main purpose: evaluating XPath expressions 😆
The text was updated successfully, but these errors were encountered: