Skip to content

JSON factory: a misspelt "type" lists no candidates and a missing "type" leaks the nlohmann exception #67

Description

@petlenz
  • "type": "j2_plasticty" fails without listing the registered types or the nearest match.
  • An entry with no "type" key surfaces the raw nlohmann key 'type' not found exception, with no indication of which material entry it was.

Fix

Catch both in json_material_factory; report the material name (or its index in the deck when the name is missing too), and for an unknown type list the registered ones.

All references are to main at 91bd26f.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions