Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when network results do not exist #182

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

alihamdan
Copy link
Member

Consider this example

import roseau.load_flow as lf
en = lf.ElectricalNetwork.from_catalogue("LVFeeder00939", "summer")
en.res_loads  # <- error

Before:

RoseauLoadFlowException: Results for PowerLoad 'LVBus004111_production' are not available because the load flow has not been run yet. [load_flow_not_run]

After:

RoseauLoadFlowException: The load flow results are not available because the load flow has not been run yet. [load_flow_not_run]

@alihamdan alihamdan added the enhancement New feature or request label Feb 20, 2024
@alihamdan alihamdan requested a review from benoit9126 February 20, 2024 13:04
@alihamdan alihamdan self-assigned this Feb 20, 2024
@alihamdan alihamdan merged commit 39dd324 into develop Feb 20, 2024
4 checks passed
@alihamdan alihamdan deleted the no-result branch February 20, 2024 13:11
@benoit9126 benoit9126 mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants