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

Closed
wants to merge 1 commit into 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
Copy link
Member

gdalle commented Dec 31, 2024

Superseded by #667

@gdalle gdalle closed this Dec 31, 2024
@gdalle gdalle deleted the ChrisRackauckas-patch-1 branch December 31, 2024 09:20
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