fix serious bug introduced with the media InputStream changes that caused a database...
authormh <mh>
Fri, 15 Nov 2002 22:13:21 +0000 (22:13 +0000)
committermh <mh>
Fri, 15 Nov 2002 22:13:21 +0000 (22:13 +0000)
source/mircoders/entity/EntityImages.java

index ced3e75..2617cc1 100755 (executable)
@@ -54,7 +54,7 @@ import mir.storage.*;
  * Diese Klasse enthält die Daten eines MetaObjekts
  *
  * @author RK, mh
- * @version $Id: EntityImages.java,v 1.8 2002/11/04 04:35:21 mh Exp $
+ * @version $Id: EntityImages.java,v 1.9 2002/11/15 22:13:21 mh Exp $
  */
 
 
@@ -105,7 +105,6 @@ public class EntityImages extends EntityUploadedMedia
                } catch (Exception e) {
       e.printStackTrace();
       theLog.printError("EntityImages -- getImage failed"+e.toString()); 
-      throwStorageObjectException(e, "EntityImages -- getImage failed: ");
       try {
         con.setAutoCommit(true);
       } catch (Exception e2) {
@@ -115,8 +114,9 @@ public class EntityImages extends EntityUploadedMedia
             +e2.toString()); 
       }
       theStorageObject.freeConnection(con,stmt);
+      throwStorageObjectException(e, "EntityImages -- getImage failed: ");
     }
-    //}
+
     return img_in;
        }
 
@@ -235,7 +235,6 @@ public class EntityImages extends EntityUploadedMedia
                } catch (Exception e) {
       e.printStackTrace();
       theLog.printError("EntityImages -- getIcon failed"+e.toString()); 
-      throwStorageObjectException(e, "EntityImages -- getIcon failed:");
       try {
         con.setAutoCommit(true);
       } catch (Exception e2) {
@@ -245,6 +244,7 @@ public class EntityImages extends EntityUploadedMedia
             +e2.toString()); 
       }
       theStorageObject.freeConnection(con,stmt);
+      throwStorageObjectException(e, "EntityImages -- getIcon failed:");
                }
 
     return img_in;