Search in sources :

Example 21 with ExternalSystemException

use of com.intellij.openapi.externalSystem.model.ExternalSystemException in project intellij-community by JetBrains.

the class ExternalSystemTaskManagerWrapper method executeTasks.

@Override
public void executeTasks(@NotNull ExternalSystemTaskId id, @NotNull List<String> taskNames, @NotNull String projectPath, @Nullable S settings, @Nullable String jvmAgentSetup) throws RemoteException, ExternalSystemException {
    myProgressManager.onStart(id, projectPath);
    try {
        getDelegate().executeTasks(id, taskNames, projectPath, settings, jvmAgentSetup);
        myProgressManager.onSuccess(id);
    } catch (ExternalSystemException e) {
        myProgressManager.onFailure(id, e);
        throw e;
    } catch (Exception e) {
        myProgressManager.onFailure(id, e);
        throw new ExternalSystemException(e);
    } finally {
        myProgressManager.onEnd(id);
    }
}
Also used : ExternalSystemException(com.intellij.openapi.externalSystem.model.ExternalSystemException) ExternalSystemException(com.intellij.openapi.externalSystem.model.ExternalSystemException) RemoteException(java.rmi.RemoteException)

Aggregations

ExternalSystemException (com.intellij.openapi.externalSystem.model.ExternalSystemException)21 File (java.io.File)6 NotNull (org.jetbrains.annotations.NotNull)6 IOException (java.io.IOException)5 LocationAwareExternalSystemException (com.intellij.openapi.externalSystem.model.LocationAwareExternalSystemException)4 Nullable (org.jetbrains.annotations.Nullable)3 Application (com.intellij.openapi.application.Application)2 PrintWriter (java.io.PrintWriter)2 StringWriter (java.io.StringWriter)2 Assert.assertNotNull (junit.framework.Assert.assertNotNull)2 Test (org.junit.Test)2 Message (com.android.ide.common.blame.Message)1 SyncErrorHandler (com.android.tools.idea.gradle.project.sync.errors.SyncErrorHandler)1 MessageType (com.android.tools.idea.gradle.project.sync.messages.MessageType)1 SyncMessage (com.android.tools.idea.gradle.project.sync.messages.SyncMessage)1 SyncMessages (com.android.tools.idea.gradle.project.sync.messages.SyncMessages)1 LocalProperties (com.android.tools.idea.gradle.util.LocalProperties)1 PositionInFile (com.android.tools.idea.gradle.util.PositionInFile)1 ValidationResult (com.android.tools.idea.sdk.SdkPaths.ValidationResult)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1