Custom Exception inherits the properties from the Exception class. Whenever we declare our own exception, it is known as custom exception.