Raise ValueError if you try to parse an invalid SMILES string.

RDKit will print something out to STDErr explaining the mistake.