Skip to content

Remove InvalidNameReuse exception in favor of in InvalidModel #2395

Open
@matthewfeickert

Description

@matthewfeickert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIChanges the public APIhelp wantedExtra attention is needed / contributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions