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

Catch Zygote nothing returns and give an informative error message #604

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChrisRackauckas
Copy link
Member

This is much more informative than iterate(::Nothing) not defined.

This is much more informative than `iterate(::Nothing)` not defined.
Copy link
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a bad idea! I would suggest

  • throwing a custom error instead of the generic ErrorException, something like ZygoteNothingError
  • doing the same for other operators (unless there are some which cannot return nothing?)
  • adding tests (I'll take care of that last part)

@gdalle gdalle marked this pull request as draft November 13, 2024 09:28
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

Successfully merging this pull request may close these issues.

2 participants