Skip to content

Commit

Permalink
Catching exceptions while loading the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemen committed Aug 11, 2012
1 parent c5a313a commit d21e38e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/org/netbeans/gradle/project/NbGradleProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.gradle.tooling.BuildException;
import org.gradle.tooling.GradleConnectionException;
import org.gradle.tooling.GradleConnector;
import org.gradle.tooling.ModelBuilder;
import org.gradle.tooling.ProgressEvent;
Expand Down Expand Up @@ -124,6 +126,10 @@ public void run() {
currentModel = loadModel(projectDir);
} catch (IOException ex) {
LOGGER.log(Level.WARNING, "Failed to load the project.", ex);
} catch (BuildException ex) {
LOGGER.log(Level.WARNING, "Failed to build the project.", ex);
} catch (GradleConnectionException ex) {
LOGGER.log(Level.WARNING, "Failed to connect to the gradle daemon.", ex);
}

SwingUtilities.invokeLater(new Runnable() {
Expand Down

0 comments on commit d21e38e

Please sign in to comment.