Skip to content

Commit

Permalink
Ensure any exception is also logged.
Browse files Browse the repository at this point in the history
  • Loading branch information
guw committed Nov 15, 2023
1 parent e4baaa3 commit 67370c1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
// after provisioning and cleanup we go over the projects a second time to initialize the classpaths
initializeClasspaths(targetProjects, workspace, progress.split(1, SUPPRESS_NONE));
return Status.OK_STATUS;
} catch (Exception e) {
LOG.error("Error synchronizing workspace '{}': {}", workspace.getLocation(), e.getMessage(), e);
return e instanceof CoreException ce ? ce.getStatus()
: Status.error(format("Error synchronizing workspace '%s'", workspace.getLocation()), e);
} finally {
// resume cache invalidation
workspace.getModelManager().getResourceChangeProcessor().resumeInvalidationFor(workspace);
Expand Down

0 comments on commit 67370c1

Please sign in to comment.