You need to differentiate between exceptions and errors.
* To raise an exception, which will cause you to 'jump' to the 'nearest' except clause, use the keyword 'raise'
* To generate an error (to indicate an error has occurred with the code you are testing) call LogError(). This will not cause an exception and so your script will continue along normally (skipping any except clauses).
It sounds like you are looking for 'raise' in this case.
OK, I see that.
Once I am in else statement, I have an error situation. I need to log this without halting scripts. So I was forcing an error in do statement to get to except.
Anyhow, I will use LogError() function in else statement and see if this works for me.