Skip to content

BMI: return 1 on update if solve not successful - #2341

Merged
visr merged 3 commits into
mainfrom
bmi-status
Jun 4, 2025
Merged

BMI: return 1 on update if solve not successful#2341
visr merged 3 commits into
mainfrom
bmi-status

Conversation

@visr

@visr visr commented Jun 3, 2025

Copy link
Copy Markdown
Member

This changes the return code of update and update_until to only return 0 if the solve was successful.
@HendrikKok does this seem ok to you? Or should other methods be changed as well? For other methods like get_current_time it is a bit unclear to me what a failure would mean. I assume that it failed to get the current time, and not that the solve of the last update was unsuccesful.

@visr
visr requested a review from HendrikKok June 3, 2025 13:32

@evetion evetion 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.

It's a bit ugly that the macro returns in failures, but you have to pass success yourself. Can't you add return update_retcode(model) to the macro as well?

@visr

visr commented Jun 4, 2025

Copy link
Copy Markdown
Member Author

Yeah I agree, but I think this method should only be used for two BMI functions. Otherwise I need a different macro for those.

@visr
visr merged commit 2ec1ccc into main Jun 4, 2025
@visr
visr deleted the bmi-status branch June 4, 2025 15:04
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.

2 participants