From 2a23933b5e85c1b2db95d5baac7f02880ea92779 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 17 Mar 2015 18:05:54 +0100 Subject: [PATCH] catch Throwable instead of Exception in Computation threads --- .../java/org/sonar/server/computation/ComputationService.java | 3 +-- .../java/org/sonar/server/computation/ComputationThread.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationService.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationService.java index cdaca50a7d1..bc83b093cac 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationService.java @@ -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); diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationThread.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationThread.java index e70b15feb73..d60cc0b7f62 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationThread.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ComputationThread.java @@ -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 { -- 2.39.5