Imagine a building where drug-sniffing dogs roam the corridors, air-quality sensors alert officials if anyone is inhaling a controlled substance, using the bathroom is a privilege rather than a right, clothing is searched in case anyone is hiding contraband up their sleeves, and those who are caught breaking the rules could face life-derailing punishments.

You might be imagining a prison. In fact, I have just described a public school in Texas, where the authorities are so obsessed with stopping teenagers from vaping that they are perfectly willing to treat them like inmates.

That's the only conclusion one can reach from this eye-opening Texas Tribune article, which details the state's draconian efforts to crack down on the vaping scourge. This year, Texas raised the vaping age from 18 to 21, and schools are pulling out all the stops—including installing "vape-detecting" sensors in the hallways—to prevent underage usage. The Tribune reports:

Vaping nicotine alone is prohibited for students under age 21, and an increasing number are being suspended or removed from regular classes and sent to alternative schools designed for students with disciplinary problems. A smaller—but rapidly growing—number of students are being expelled when suspected of vaping THC, the mind-altering ingredient in marijuana and a felony-level controlled substance under state law. THC oils or waxes used in vape pens are almost always more potent than the marijuana plant. Police are called and students arrested in cases where officials simply suspect a vape pen contains illegal drugs. As vaping continues to outpace traditional smoking among the nation's youth, students who a few years ago may have been charged with at most a misdemeanor for smoking a joint are now facing felony charges for having a vape pen in their backpacks.

The article highlights a few concrete examples. Student Thomas Williams-Platt, age 17, brought a vape pen into school that he had purchased from another student. Police conducted an on-site drug test that determined it contained THC. He was arrested, handcuffed, and booked into jail, where he spent hours in a cell "listening to the screams of other arrestees suffering from drug withdrawal." Texas law considers 17-year-olds to be adults for sentencing purposes, which meant that Williams-Platt could face felony charges.

That 17-year-olds in Texas are considered insufficiently mature to vape, but plenty old enough to go to prison, is an absurd and unconscionable hypocrisy. It's also the law.

When students are caught vaping, they are often immediately expelled and shipped off to alternative schools for serious wrongdoers. These are even worse environments for young people, described by Williams-Platt as a kind of "super strict kindergarten" where students learn very little, except perhaps to follow capricious and arbitrary rules. The number of Texas kids sentenced to these schools has increased 6o percent since last year, and officials say the war on vaping is largely to blame.

To the extent that vaping is harmful, most of the danger comes from consuming illicit, black market vaping products—the very sort of vaping that becomes more common as the industry is driven underground by overzealous legislators. But let's say the health concerns were well-founded. What's worse for the average teenager: vaping, or going to prison? There should be no doubt that the solution to this supposed problem—pulling kids out of good schools to send them to bad schools, treating them like inmates, and charging them with felonies—is significantly more harmful.

The war on vaping is a moral panic with terrible consequences for the very people it is supposedly designed to protect. Sadly, it is likely to get much worse. Various Republican and Democratic senators have proposed a federal measure to ban all tobacco products—including e-cigarettes—for everyone under the age of 21.