Use ValueError instead of SyntaxError throughout.