File-By-File
NullAngleException

NullAngleException

This exception is thrown whenever an operation is requested to be performed on an Angle object that is null. It serves to prevent NullPointerExceptions and provide more specific error messages related to Angle objects.

Methods

NullAngleException(String message)

Constructs a new NullAngleException with the specified detail message.

  • message: The detail message (a String) explaining the reason for the exception.

throwIfInvalid(String message, Angle angle)

Static method that throws a NullAngleException if the provided angle is null.

  • message: The message to be used for the exception if it is thrown.
  • angle: The Angle object to validate for nullity.