BUG-4638: create a dedicated exception for range/length validation