Skip to content

Commit ce6a697

Browse files
committed
Fixed pyramid side length error message
1 parent 8b49bc5 commit ce6a697

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/java/com/thealgorithms/maths

‎src/main/java/com/thealgorithms/maths/Area.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static double surfaceAreaSphere(final double radius) {
7878
*/
7979
public static double surfaceAreaPyramid(final double sideLength, final double slantHeight) {
8080
if (sideLength <= 0) {
81-
throw new IllegalArgumentException("");
81+
throw new IllegalArgumentException("Must be a positive sideLength");
8282
}
8383
if (slantHeight <= 0) {
8484
throw new IllegalArgumentException("slant height must be greater than 0");

0 commit comments

Comments
 (0)