rajasekarv / vega

A new arguably faster implementation of Apache Spark from scratch in Rust
Apache License 2.0
2.23k stars 205 forks source link

First pass of error handling #22

Closed steven-joruk closed 4 years ago

steven-joruk commented 4 years ago

A few of us discussed which error handling crate to use on gitter.im and decided upon thiserror. This is because it conforms to std::error:Error - if it's desirable to change to another crate in the future it should be painless for us and seamless for people using native_spark.

This is a major API break for Context::new and also converts a couple of signed integers to unsigned to prevent propagation of invalid values (all values of u16 are valid ports, timeouts can't be negative, etc.).

I stopped at this point because I have to learn more about capnp, serde_closure, etc. in order to work out whether it's correct to return Results for RPCs, or whether another approach is more appropriate.

rajasekarv commented 4 years ago

It looks pretty good. Thanks @steven-joruk