JuliaActuary / MortalityTables.jl

Easily Reference and use Actuarial Mortality Tables
https://juliaactuary.github.io/MortalityTables.jl/stable
Other
28 stars 10 forks source link

Error handling on nonexistent tables #108

Closed MatthewCaseres closed 3 years ago

MatthewCaseres commented 3 years ago
MortalityTables.table("Hello World")

Yields an error like this for me:

ArgumentError: ArgumentError: invalid index: nothing of type Nothing

Stacktrace:
  [1] to_index(i::Nothing)
...

Can this error be handled in a more informative way?

alecloudenback commented 3 years ago

Thanks for the suggestion!