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

Helpful error when using an invalid schedule in OutputWriters, Diagnostics, and Callbacks #2180

Closed
navidcy opened this issue Jan 25, 2022 · 1 comment

Comments

@navidcy
Copy link
Collaborator

navidcy commented Jan 25, 2022

A common mistake is to give a Number as a schedule instead of TimeInterval(Number). It'd be much more user-friendly if we have have a function that validates the schedule (and throw an error) because as is now, the first time you encounter the error usually in run! and it's hard to pin-point it.

Another solution is to test-call the schedule when you initialize the simulation (e.g., put it in a try-catch) and throw the error to user?

(discovered with @glwagner)

@glwagner glwagner changed the title Invalid schedule Helpful error when using an invalid schedule in OutputWriters, Diagnostics, and Callbacks Jan 25, 2022
@glwagner
Copy link
Member

I think we do check this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants