initArgs[0] = absoluteURL;
initArgs[1] = imgReader;
imageInstance = imageConstructor.newInstance(initArgs);
- } catch (Exception ex) {
- throw new FopImageException(
- "Error creating FopImage object (" +
- absoluteURL.toString() + ") : " + ex.getMessage());
- }
+ } catch (java.lang.reflect.InvocationTargetException ex) {
+ Throwable t = ex.getTargetException();
+ String msg;
+ if (t != null) {
+ msg = t.getMessage();
+ }
+ else {
+ msg = ex.getMessage();
+ }
+ throw new FopImageException(
+ "Error creating FopImage object (" +
+ absoluteURL.toString() + ") : " + msg
+ );
+ } catch (Exception ex) {
+ throw new FopImageException(
+ "Error creating FopImage object (" +
+ "Error creating FopImage object (" +
+ absoluteURL.toString() + ") : " + ex.getMessage()
+ );
+ }
if (! (imageInstance instanceof org.apache.fop.image.FopImage)) {
throw new FopImageException(
"Error creating FopImage object (" +
super(href);
}
- public GifJpegImage(URL href, ImageReader imgReader) {
+ public GifJpegImage(URL href, ImageReader imgReader)
+ throws FopImageException {
super(href, imgReader);
}
public class JimiImage extends AbstractFopImage {
public JimiImage(URL href) throws FopImageException {
super(href);
+ try {
+ Class c = Class.forName("com.sun.jimi.core.Jimi");
+ } catch (ClassNotFoundException e) {
+ throw new FopImageException("Jimi image library not available");
+ }
}
- public JimiImage(URL href, ImageReader imgReader) {
+ public JimiImage(URL href, ImageReader imgReader) throws FopImageException {
super(href, imgReader);
+ try {
+ Class c = Class.forName("com.sun.jimi.core.Jimi");
+ } catch (ClassNotFoundException e) {
+ throw new FopImageException("Jimi image library not available");
+ }
}
protected void loadImage() throws FopImageException {