Skip to content

Commit

Permalink
Wrapped the OperationCanceledException in InterruptedException
Browse files Browse the repository at this point in the history
  • Loading branch information
amartya4256 authored and HeikoKlare committed Dec 6, 2023
1 parent ac8883f commit c0c0f60
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ private static void runInCurrentThread(IRunnableWithProgress runnable, IProgress
runnable.run(progressMonitor);
}
} catch (OperationCanceledException e) {
throw new InterruptedException();
InterruptedException interruptedException = new InterruptedException(e.getLocalizedMessage());
interruptedException.initCause(e);
throw interruptedException;
} catch (InvocationTargetException | InterruptedException | ThreadDeath e) {
// Make sure to propagate ThreadDeath, or threads will never fully
// terminate.
Expand Down

0 comments on commit c0c0f60

Please sign in to comment.