added exception if interval parameter is in wrong format