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

Better error message with Missings #22

Closed
VEZY opened this issue Feb 9, 2023 · 1 comment
Closed

Better error message with Missings #22

VEZY opened this issue Feb 9, 2023 · 1 comment

Comments

@VEZY
Copy link
Member

VEZY commented Feb 9, 2023

When we pass a DataFrame to Weather (or TimeStepTable{Atmosphhere}) that has some missing values, we get the following error:

julia> w = Weather(df)
ERROR: MethodError: no method matching var"#Atmosphere#3"(::Missing, ::Float64, ::Missing, ::Missing, [...])

This is because we don't accept Missing values for the default Atmosphere variables (and this is the right way to do so).

But, we could print a nicer error message because it is complicated to understand where the error comes from with this one.

We could have something like:

ERROR: ArgumentError: Missing values found in the DataFrame. This is not authorized.
@VEZY
Copy link
Member Author

VEZY commented Feb 14, 2023

Fixed in 19f61c3 and 9beda3b

@VEZY VEZY closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant