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 for lines between 2 Xnodes #2682

Merged
merged 3 commits into from
Aug 23, 2023

Conversation

geofjamg
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Error message improvement

What is the current behavior?

When we have a line between 2 xnodes in a UCTE file, we get an error message but without the information of the 2 xnodes.

What is the new behavior (if this is a feature change)?
We have the name of the 2 xnodes.

Does this PR introduce a breaking change or deprecate an API?

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@@ -457,7 +457,7 @@ private static void createLine(UcteNetworkExt ucteNetwork, Network network,
createDanglingLine(ucteLine, connected, xnode, nodeCode1, ucteVoltageLevel1, network);

} else {
throw new UcteException("Line between 2 Xnodes");
throw new UcteException("Line between 2 Xnodes: '" + nodeCode1 + "' and '" + nodeCode2 + "'");
Copy link
Member

Choose a reason for hiding this comment

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

Just a detail but in the rest of the code, in error messages we write "X-node". I don't know what way is the good one.

Copy link
Member Author

Choose a reason for hiding this comment

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

In UCTE import, I can see one "Xnode" and one "XNODE"

Copy link
Member

Choose a reason for hiding this comment

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

What do you prefer? I will commit in your PR just a uniformisation if you don't mind.

Copy link
Member Author

Choose a reason for hiding this comment

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

I replaced all by X-node

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@geofjamg geofjamg requested a review from annetill August 23, 2023 11:57
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

75.0% 75.0% Coverage
0.0% 0.0% Duplication

@annetill annetill merged commit ca12bd6 into main Aug 23, 2023
@annetill annetill deleted the improve_error_msg_line_2_xnodes branch August 23, 2023 13:46
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