Michael McCandless <luc...@mikemccandless.com> wrote: > I'm playing with 2.4.1 RC3 (on OS X 10.5.6) and found a few issues: > > * If I fail to call lucene.initVM, I get a rather unfriendly Bus > Error. Is it possible (desirable?) to detect this and throw a > friendly exception instead?
I was thinking about this some more, and have an idea. How about only having the dictionary of the module init'ed by calling initVM? That is, it would be practically speaking impossible to call any other Java method until the VM has been initialized and the thread attached. The overhead would go into "import", where it might be acceptable. So instead of getting the bus error, you'd get an AttributeError. Or, keep the dictionary, but map the values associated with each variable in the module to an error function which raises JavaNotInitialized, and do the real mapping after the initialization step. Bill