[Bug 1176] Resolve IDL/exception mismatch in createProgram and waitForEvents