Skip to content

Draft: Kommon: Error when trying to convert KContainer to wrong type - #161

Open
2xB wants to merge 2 commits into
KATRIN-Experiment:mainfrom
2xB:kcontainer_failexplicitly
Open

Draft: Kommon: Error when trying to convert KContainer to wrong type#161
2xB wants to merge 2 commits into
KATRIN-Experiment:mainfrom
2xB:kcontainer_failexplicitly

Conversation

@2xB

@2xB 2xB commented Sep 7, 2026

Copy link
Copy Markdown
Member

Before, this lead to an undiscovered issue where a configuration value was just not used since quite some time, compare #157 . Ideally this makes such issues obvious already in development when they first occur.

I already noticed just by running a random example that KZonalHarmonicParameters::SetNCentralCoefficients(unsigned int) in the bindings is set to get int. So this verbose error instead of a silent fail is helpful and we need to look into what else errors now.

Marked this as a draft since I believe we first should find as many problematic bindings as possible and only then merge this.

It would just be awesome if the runtime error would be augmented with information on which element is currently processed to debug this more easily.

2xB added 2 commits September 7, 2026 23:01
Before, this lead to an undiscovered issue where a configuration value was just not used since quite some time, compare KATRIN-Experiment#157 . Ideally this makes such issues obvious already in development when they first occur.
For reasons beyond me, initmsg(eError) is neither printed nor shows an error. Using runtime_error instead, which does actually fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant