On Thu, 17 Jul 2008, Bill Janssen wrote:
Exception in thread "main" java.lang.IllegalArgumentException: Unknown image
type 0
And no stacktrace ?
Yes, I have a stacktrace. (Or had -- I think I've deleted it.)
What's interesting in it? I'm trying to create a BufferedImage from
another BufferedImage, read in using ImageIO.read(). The constructor
for BufferedImage is raising this exception.
Exception in thread "main" java.lang.IllegalArgumentException: Unknown image
type 0
at java.awt.image.BufferedImage.<init>(BufferedImage.java:490)
The code that it's objecting to is this:
BufferedImage newImg = new BufferedImage((int)(scl*width), (int)(scl*height),
oldImg.getType());
Ok, so we've determined that the original error is a user error.
Now, it'd be interesting to see why the JCC-generated code is not catching
the exception as expected and reporting it.
Every generated call into Java is supposed to be surrounded by an INT_CALL()
or OBJ_CALL() macro (defined in macros.h) that expands into a try/catch C++
construct converting the C++ exception into a Python one.
A gdb stacktrace (with symbols) should prove most useful.
Andi..
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev