dashbitco / nimble_options

A tiny library for validating and documenting high-level options. 💽
Apache License 2.0
507 stars 38 forks source link

Return structured errors everywhere #38

Closed whatyouhide closed 4 years ago

whatyouhide commented 4 years ago

Closes #37.

This is a breaking change. Instead of returning {:error, string}, now we return {:error, %NimbleOptions.ValidationError{}} everywhere. For now this error has the message and the path to the failing option but we can change it however we want in the future.

cc @leandrocp @kevinkoltz