You are viewing a plain text version of this content. The canonical link for it is here.
Posted to droids-commits@incubator.apache.org by rf...@apache.org on 2011/11/22 01:30:02 UTC

svn commit: r1204776 - /incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java

Author: rfrovarp
Date: Tue Nov 22 01:29:56 2011
New Revision: 1204776

URL: http://svn.apache.org/viewvc?rev=1204776&view=rev
Log:
Fixed DROIDS-156

Modified:
    incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java

Modified: incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java
URL: http://svn.apache.org/viewvc/incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java?rev=1204776&r1=1204775&r2=1204776&view=diff
==============================================================================
--- incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java (original)
+++ incubator/droids/branches/0.1.x/droids-core/src/main/java/org/apache/droids/robot/crawler/CrawlingWorker.java Tue Nov 22 01:29:56 2011
@@ -69,7 +69,13 @@ public class CrawlingWorker implements W
       if (log.isInfoEnabled()) {
         log.info("Loading " + uri);
       }
-      ManagedContentEntity entity = protocol.load(uri);
+      ManagedContentEntity entity = null;
+      try {
+        entity = protocol.load(uri);
+      } catch(OutOfMemoryError e) {
+        log.error("Out of memory processing: " + uri + " skipping", e);
+        throw new DroidsException(e);
+      }
       try {
         String contentType = entity.getMimeType();
         if (log.isDebugEnabled()) {