diff --git a/CHANGELOG.md b/CHANGELOG.md index dffbef0f43..f04703d8ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Throw exception if the slack node is not directly conected to a transformer. [#525](https://github.com/ie3-institute/simona/issues/525) - Added support for topologies without transformers and slack grids with multiple nodes [#1099](https://github.com/ie3-institute/simona/issues/1099) - Checking the number of slack nodes [#1122](https://github.com/ie3-institute/simona/issues/1122) +- Enhance exception message in case of InvalidGridException [#1124](https://github.com/ie3-institute/simona/issues/1124) ### Changed - Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435) diff --git a/src/main/scala/edu/ie3/simona/model/grid/GridModel.scala b/src/main/scala/edu/ie3/simona/model/grid/GridModel.scala index 16285b9317..6714ca275f 100644 --- a/src/main/scala/edu/ie3/simona/model/grid/GridModel.scala +++ b/src/main/scala/edu/ie3/simona/model/grid/GridModel.scala @@ -407,7 +407,7 @@ object GridModel { noLines && noTransformers2w && noTransformers3w && (noOfNodes > noOfSlackNodes) ) throw new InvalidGridException( - "The grid contains no basic branch elements (lines or transformers)." + f"The grid with subnet number ${gridModel.subnetNo} contains additional nodes beside the slack nodes and no basic branch elements (lines or transformers). This is invalid." ) // slack