Skip to content

Commit

Permalink
refactor: change error message from exception part to comment
Browse files Browse the repository at this point in the history
Signed-off-by: CHIQUET Benoit <benoit.chiquet@rte-france.com>
  • Loading branch information
bc-rte committed Nov 7, 2024
1 parent 5bf08e0 commit 794aa18
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ private String readString() {
}
byte[] stringBytes = dis.readNBytes(stringNbBytes);
if (stringBytes.length != stringNbBytes) {
throw new PowsyblException("Cannot read the full string, bytes missing: " + (stringNbBytes - stringBytes.length)
+ " (this may happen when the attribute wasn't written in the first place, causing string length to be an aberrant number)");
// this may happen when the attribute wasn't written in the first place, causing string length to be an aberrant number
throw new PowsyblException("Cannot read the full string, bytes missing: " + (stringNbBytes - stringBytes.length));
}
return new String(stringBytes, StandardCharsets.UTF_8);
} catch (IOException e) {
Expand Down

0 comments on commit 794aa18

Please sign in to comment.