]> source.dussan.org Git - sonarqube.git/commitdiff
catch Throwable instead of Exception in Computation threads
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 17 Mar 2015 17:05:54 +0000 (18:05 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Wed, 18 Mar 2015 07:39:43 +0000 (08:39 +0100)
server/sonar-server/src/main/java/org/sonar/server/computation/ComputationService.java
server/sonar-server/src/main/java/org/sonar/server/computation/ComputationThread.java

index cdaca50a7d167380f32138b8b826d35d39de75e2..bc83b093cac22b6f1b14e62203d9e16758c2da7f 100644 (file)
@@ -84,10 +84,9 @@ public class ComputationService implements ServerComponent {
       }
       item.dto.succeed();
 
-    } catch (Exception e) {
+    } catch (Throwable e) {
       item.dto.fail();
       throw Throwables.propagate(e);
-
     } finally {
       item.dto.setFinishedAt(system.now());
       saveActivity(item.dto, project);
index e70b15feb7396ed68d0c4c0f2c1fc1a51d14657a..d60cc0b7f62c305b6898ee8c83d100aa73be8aaa 100644 (file)
@@ -56,7 +56,7 @@ public class ComputationThread implements Runnable {
     if (item != null) {
       try {
         container.execute(item);
-      } catch (Exception e) {
+      } catch (Throwable e) {
         LOG.error(String.format(
           "Failed to process analysis report %d of project %s", item.dto.getId(), item.dto.getProjectKey()), e);
       } finally {