more error handling.
[mir.git] / source / mircoders / storage / DatabaseContent.java
index 5a76432..2c750d0 100755 (executable)
@@ -65,7 +65,7 @@ public class DatabaseContent extends Database implements StorageObject {
       stmt = con.createStatement();
       executeUpdate(stmt,sql);
     }
-    catch (Exception e) {theLog.printDebugInfo("-- set unproduced failed");}
+    catch (Exception e) {_throwStorageObjectException(e, "-- set unproduced failed");}
     finally { freeConnection(con,stmt);}
   }
 
@@ -73,13 +73,13 @@ public class DatabaseContent extends Database implements StorageObject {
    * returns the comments that belong to the article (via entityrelation)
    * where db-flag is_published is true
    */
-  public SimpleList getComments(EntityContent entC) {
+  public SimpleList getComments(EntityContent entC) throws StorageObjectException {
     SimpleList comments=null;
     try {
       comments = relationComments.getManyAsSimpleList(entC,"webdb_create","is_published='1'");
     }
     catch (StorageObjectException e) {
-      theLog.printError("DatabaseComments :: failed to get comments");
+      _throwStorageObjectException(e, "DatabaseComments :: failed to get comments");
     }
     return comments;
   }
@@ -87,13 +87,13 @@ public class DatabaseContent extends Database implements StorageObject {
   /**
    * returns the features that belong to the article (via entityrelation)
    */
-  public SimpleList getFeature(EntityContent entC) {
+  public SimpleList getFeature(EntityContent entC) throws StorageObjectException {
     SimpleList feature=null;
     try {
       feature = relationFeature.getManyAsSimpleList(entC);
     }
     catch (StorageObjectException e) {
-      theLog.printError("DatabaseComments :: failed to get features");
+      _throwStorageObjectException(e, "DatabaseComments :: failed to get features");
     }
     return feature;
   }