Skip to content

[FEATURE] More readable exception types #564

@mgovers

Description

@mgovers

Describe the feature request

Since C++20, the <format> STL functionality was introduced to improve string formatting:

  • more readable
  • less use of std::to_string (only when strictly necessary)
  • no unnecessary copying between stack and heap

This issue is about replacing the current PowerGridError and derived exceptions' constructor implementations with more readable patterns using formatted strings.

  • For static format patterns, std::format can be used
  • For format patterns that are not compile-time known, std::formatv needs to be used

The documentation on either is relatively clear, so it should not be a hard ticket to pick up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestgood first issueIndicates a good issue for first-time contributors

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions