An internal exception is thrown when an unexpected error happens during the normal operation of the software. Ideally, this exception would never be thrown during execution. If it ever gets thrown, it is because a bug has been detected in the software.
In the source code of the software, this exception should be thrown whenever an unexpected situation is detected. For example, the exception should be thrown when some method argument is null
and the method requires a non-null argument.