avoid leaks from failing HgConfigTest.setUp, attempt 2
authorpeter <peter@jetbrains.com>
Mon, 16 Feb 2015 11:11:45 +0000 (12:11 +0100)
committerpeter <peter@jetbrains.com>
Mon, 16 Feb 2015 11:13:25 +0000 (12:13 +0100)
plugins/hg4idea/testSrc/hg4idea/test/config/HgConfigTest.java

index d2e4f0c84e95120c0231508f375ec7c2918f25ca..5e71b6ae136b9aee17442c1e6ca8b478013c69a0 100644 (file)
@@ -23,8 +23,13 @@ public class HgConfigTest extends HgPlatformTest {
     try {
       prepareSecondRepository();
     }
     try {
       prepareSecondRepository();
     }
-    catch (Throwable e) {
+    catch (Exception e) {
       tearDown();
       tearDown();
+      throw e;
+    }
+    catch (Error e) {
+      tearDown();
+      throw e;
     }
   }
 
     }
   }