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

Remove InvalidNameReuse exception in favor of in InvalidModel #2395

Open
matthewfeickert opened this issue Dec 8, 2023 · 0 comments
Open
Labels
API Changes the public API help wanted Extra attention is needed / contributions welcome

Comments

@matthewfeickert
Copy link
Member

In relation to Issue #2059, @lorenzennio was wanting to handle this via raising InvalidNameReuse though he and @kratsg pointed out that what is actually happening is maybe a better use of InvalidModel. InvalidNameReuse was added in PR #209 though in the current uses of InvalidNameReuse

if len(combined_paramset[k]) != 1:
raise exceptions.InvalidNameReuse(
f"Multiple values for '{k}' ({list(combined_paramset[k])}) were found for {paramset_name}. Use unique modifier names when constructing the pdf."
)

@kratsg thinks this should just be covered by InvalidModel.

If this actually is an invalid model then InvalidNameReuse can be removed everywhere in the code and InvalidModel can be used instead.

@matthewfeickert matthewfeickert added help wanted Extra attention is needed / contributions welcome API Changes the public API labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API help wanted Extra attention is needed / contributions welcome
Projects
None yet
Development

No branches or pull requests

1 participant