Those clearXXXListeners() are not needed, so clean up a bit.
A bit more safety.
Check exception error code.