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 for set inclusion usage #1296

Closed
mforets opened this issue Apr 22, 2019 · 0 comments · Fixed by #1299
Closed

Better error message for set inclusion usage #1296

mforets opened this issue Apr 22, 2019 · 0 comments · Fixed by #1299
Assignees
Labels
documentation 📖 Documentation and manual

Comments

@mforets
Copy link
Member

mforets commented Apr 22, 2019

Similar in spirit to #1282, we can add a better error message to the (incorrect) usage:

julia> Z = rand(Zonotope);

julia> center(Z)  Z  # explain saying why this is wrong and show the correct usage
ERROR: MethodError: no method matching length(::Zonotope{Float64})
Closest candidates are:
  length(::Core.SimpleVector) at essentials.jl:561
  length(::Base.MethodList) at reflection.jl:801
  length(::Core.MethodTable) at reflection.jl:875
  ...
Stacktrace:
 [1] issubset(::Array{Float64,1}, ::Zonotope{Float64}) at ./abstractset.jl:234
 [2] top-level scope at none:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Documentation and manual
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant