improvements to Doc.java, corresponding fixes to the reference
[org.ibex.core.git] / src / org / ibex / Picture.java
index cdd33f0..d1abf61 100644 (file)
@@ -3,7 +3,7 @@ package org.ibex;
 import java.io.*;
 import org.ibex.js.*;
 import org.ibex.util.*;
-import org.xwt.translators.*;
+import org.ibex.translators.*;
 
 /** 
  *    The in-memory representation of a PNG or GIF image. It is
@@ -40,10 +40,10 @@ public class Picture {
                 InputStream in = null;
                 try {
                     in = b == null ? Stream.getInputStream(stream) : b.getImage();
-                } catch (IOException e) { Log.error(Picture.class, stream);
-                } catch (JSExn e) { Log.error(Picture.class, stream);
+                } catch (IOException e) { Log.error(Picture.class, e);
+                } catch (JSExn e) { Log.error(Picture.class, e);
                 }
-                if (in == null) { Log.warn(Picture.class, "couldn't load image for stream " + stream); return; }
+                if (in == null) { Log.warn(Picture.class, "couldn't load image for stream " + stream.unclone()); return; }
                 try {
                     PushbackInputStream pbis = new PushbackInputStream(in);
                     int firstByte = pbis.read();