Libbum / Wafer

Parallelized 3D FDTD Schrödinger Equation Solver
MIT License
21 stars 2 forks source link

Error chain handling of errors #29

Closed Libbum closed 7 years ago

Libbum commented 7 years ago

The solution to #23 was fine in the sense that it returned the error type up the chain. This is fine for libraries, but for this app, it wasn't that expressive. This PR implements an error chain which is much more functional in that sense. We get the underlying format of the error types but can also follow the propagation of errors.

At the moment a number of these pathways have been checked, but not all. So there may be some language changes and additions needed; but this groundwork is orders of magnitude better for user experience than the last solution.

codecov-io commented 7 years ago

Codecov Report

Merging #29 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   95.34%   95.34%           
=======================================
  Files           4        4           
  Lines          86       86           
=======================================
  Hits           82       82           
  Misses          4        4
Impacted Files Coverage Δ
src/output.rs 88.88% <ø> (ø) :arrow_up:
src/grid.rs 100% <ø> (ø) :arrow_up:
src/main.rs 100% <ø> (ø) :arrow_up:
src/potential.rs 100% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 66213ac...cfcf70c. Read the comment docs.