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

Consider providing information about valid ranges in the exception message #42

Open
glopesdev opened this issue Mar 12, 2024 · 0 comments
Labels
proposal Request for a new feature

Comments

@glopesdev
Copy link
Member

It might be nice to provide information about voltage and timing range in either the exception message, or as a parameter of a new ParameterOutOfRangeException so that the valid ranges can be discovered more easily by experimenting with the package.

The required range values are already available at the places where the exceptions are thrown, e.g. for voltages:

if (volts < MinVoltage || volts > MaxVoltage)
{
ThrowAndReset(new ArgumentOutOfRangeException(nameof(volts)));
}

@glopesdev glopesdev added the proposal Request for a new feature label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant