diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java index 5877423c02b6..6cfa82f63609 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java @@ -1041,4 +1041,14 @@ public class ProgressIndicatorTest extends LightPlatformTestCase { } }); } + + public void testTaskWithResultMustBeAbleToComputeException() throws Exception { + Exception result = ProgressManager.getInstance().run(new Task.WithResult(null, "", true) { + @Override + protected Exception compute(@NotNull ProgressIndicator indicator) { + return new Exception("result"); + } + }); + assertEquals("result", result.getMessage()); + } }