I'm trying to build a head that recognizes molecules. Here's the code
Mol::arg = "Invalid molecule.";
Mol[Except[Subscript[_String, _Integer] ..]] := Message[Mol::arg]
I'd expect that this code should recognize molecules of the form
Mol[Subscript["C", 4], Subscript["N", 5]]
but it should issue the message if something like
Mol[Subscript["C", 4], 7]
is entered. However, when I enter this last one, no message is issued. I don't understand what I'm doing wrong.