[Bug 1173] Fix invalid exception name in waitForEvents