Open glwagner opened 1 month ago
Maybe just
throw("Could not find the username for $(url). Please provide a password in the ECCO_PASSWORD environment variable.")
would do the trick
I think that would work. Another possibility is KeyError
https://docs.julialang.org/en/v1/base/base/#Base.KeyError
if you want to change the message to make it clear that ENV["ECCO_PASSWORD"]
must exist. This can be achieved either by adding it to ENV
or by setting the environment variable before starting julia (eg there is more than one way to achieve this).
Btw there is a discussion about this here: https://discourse.julialang.org/t/how-to-best-store-and-access-credentials-in-julia/54997
I'm not sure it's useful to call it
ArgumentError
:https://github.com/CliMA/ClimaOcean.jl/blob/514135fc9a1016ec0c32081fe3914e789b3d35ca/src/DataWrangling/ecco_metadata.jl#L156
Maybe there is another error we can use.
The same applies to
https://github.com/CliMA/ClimaOcean.jl/blob/514135fc9a1016ec0c32081fe3914e789b3d35ca/src/DataWrangling/ecco_metadata.jl#L157