MAINT: Add custom exception for incompatible history frequency specification.