Skip to content

Improve the exception in the config#1944

Merged
yhmtsai merged 1 commit into
developfrom
improve_config_errmsg
Nov 13, 2025
Merged

Improve the exception in the config#1944
yhmtsai merged 1 commit into
developfrom
improve_config_errmsg

Conversation

@yhmtsai

@yhmtsai yhmtsai commented Oct 31, 2025

Copy link
Copy Markdown
Member

It improves the exception information from the wrong config.

When give the wrong key in type, (I use "type": "Invalid" as test case)
Original exception: map::at
Updated exception: core/config/config.cpp:<line>: parse: Invalid state encountered : The value >Invalid< is invalid for the entry >type<

@yhmtsai yhmtsai self-assigned this Oct 31, 2025
@yhmtsai yhmtsai added the 1:ST:WIP This PR is a work in progress. Not ready for review. label Oct 31, 2025
@ginkgo-bot ginkgo-bot added reg:testing This is related to testing. mod:core This is related to the core module. labels Oct 31, 2025

@upsj upsj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Can you maybe add a before/after error message to the PR description?

@yhmtsai

yhmtsai commented Nov 3, 2025

Copy link
Copy Markdown
Member Author

@upsj Yes, will do when I finish the work.
It is mainly to help exasim-project/NeoFOAM#138
However, I believe I did not improve that on that case yet.

@pratikvn pratikvn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I also ran into this with OpenCARP, so it will be useful there as well.

@yhmtsai yhmtsai force-pushed the improve_config_errmsg branch from 4f74abc to 3cc6469 Compare November 11, 2025 08:56
@MarcelKoch MarcelKoch added this to the Ginkgo 1.11 milestone Nov 11, 2025
@yhmtsai yhmtsai added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:WIP This PR is a work in progress. Not ready for review. labels Nov 11, 2025
@yhmtsai

yhmtsai commented Nov 11, 2025

Copy link
Copy Markdown
Member Author

@upsj @pratikvn I have updated the exception message comparison.

@upsj

upsj commented Nov 11, 2025

Copy link
Copy Markdown
Member

Thanks! looks much better, indeed :)

@yhmtsai yhmtsai merged commit 7d93b17 into develop Nov 13, 2025
20 of 23 checks passed
@yhmtsai yhmtsai deleted the improve_config_errmsg branch November 13, 2025 21:37
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

1:ST:ready-to-merge This PR is ready to merge. mod:core This is related to the core module. reg:testing This is related to testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants