If it doesn't parse successfully it will throw an error. However keep in mind it is Parse Only you are using.
So say I have a database object name dmoDB and I do the following.
dmoDB.ExecuteImmediate "SELECT * FROM X", SQLDMOExec_ParseOnly
Even thou I don't have a table name "X" it will parse successfully as there is nothing wrong with the syntax.
However if I do.
dmoDB.ExecuteImmediate "SELEC * FROM X", SQLDMOExec_ParseOnly
I get an error because SELECT is missing the T.