The exception BadKind is thrown when
an inappropriate operation is invoked on a TypeCode object. For example,
invoking the method discriminator_type() on an instance of
TypeCode that does not represent an IDL union will cause the
exception BadKind to be thrown.