A federal judge Wednesday threw out a case lodged by gun-industry members that had sought to invalidate a 2021 law enacted by New York state that allows prosecution of gun-makers for harm caused by guns when manufacturers have knowingly or recklessly endangered the public, such as through failed screening procedures or deceptive advertising.