Skip to content
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

Thoroughly fix the error handling #22

Merged
merged 9 commits into from Aug 3, 2017
Merged

Thoroughly fix the error handling #22

merged 9 commits into from Aug 3, 2017

Commits on Jul 25, 2017

  1. Replace old errors with a more principled approach, phase 1.

    * Remove references to the old approach.
    * Define the outline of the new approach.
    * Apply it everywhere.
    * Move some error-handling code from futures to error.
    * Define an injection for FFI NulError.
    * Define WriteType as a nice modern enum.
    * Enhance the enhance_nullary_enum macro to cope with omitted variants.
    
    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 25, 2017
    Copy the full SHA
    5b046ac View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2017

  1. Add extension trait to convert error code to Result.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    72cb52e View commit details
    Browse the repository at this point in the history
  2. Pick up latest version of cassandra-cpp-sys crate.

    This has new names for the missing symbols in error-result.
    
    It also removes the to_result / error-chain handling; that rightfully
    belongs in this crate not there, and it was polluting the namespace.
    
    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    f8157e6 View commit details
    Browse the repository at this point in the history
  3. Revert to preferred naming scheme for error conversion.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    eb3a8b6 View commit details
    Browse the repository at this point in the history
  4. Remove tedious and now-unnecessary chain_err invocations.

    Cassandra errors are now just reported as such; they don't get string wrappers.
    
    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    b003a06 View commit details
    Browse the repository at this point in the history
  5. Safer and terser error handling.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    
    * Remove almost all uses of expect, unwrap, panic, unimplemented, etc.
    * Correct a few cases where the wrong error was being reported. All errors should now be cassandra::Errors.
    * Improvements to error construction helpers.
    * Wrap the ValueType type.
    kw217 committed Jul 27, 2017
    Copy the full SHA
    38026d4 View commit details
    Browse the repository at this point in the history
  6. Miscellaneous tidyups.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    dfc5d79 View commit details
    Browse the repository at this point in the history
  7. Remove extraneous blank lines.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Jul 27, 2017
    Copy the full SHA
    52b1fbe View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2017

  1. Point to newly-release cassandra-sys crate.

    Signed-off-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
    kw217 committed Aug 3, 2017
    Copy the full SHA
    802df34 View commit details
    Browse the repository at this point in the history