From 2826fb29019353355946accf5de0d7e2619713f4 Mon Sep 17 00:00:00 2001 From: Pierre Pouchin Date: Mon, 28 Mar 2022 10:03:48 +0200 Subject: [PATCH] Fixed Javadoc comments and interrupted exception --- .../java/fr/igred/ij/plugin/OMEROMacroExtension.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/igred/ij/plugin/OMEROMacroExtension.java b/src/main/java/fr/igred/ij/plugin/OMEROMacroExtension.java index 94c5b01..e551fde 100644 --- a/src/main/java/fr/igred/ij/plugin/OMEROMacroExtension.java +++ b/src/main/java/fr/igred/ij/plugin/OMEROMacroExtension.java @@ -967,12 +967,13 @@ public int saveROIs(ImagePlus imp, long id, String property) { return result; } + /** - * removes the ROIs of the image in OMERO. + * Removes the ROIs from an image in OMERO. * - * @param id The image ID on OMERO. + * @param id The image ID on OMERO. * - * @return The 1 if at least one ROI has been deleted + * @return The number of ROIs that were deleted. */ public int removeROIs(long id) { @@ -984,8 +985,11 @@ public int removeROIs(long id) { client.delete(roi); removed++; } - } catch (ServiceException | AccessException | ExecutionException | OMEROServerError | InterruptedException e) { + } catch (ServiceException | AccessException | ExecutionException | OMEROServerError e) { IJ.error("Could not remove image ROIs: " + e.getMessage()); + } catch (InterruptedException e) { + IJ.error("Could not remove image ROIs: " + e.getMessage()); + Thread.currentThread().interrupt(); } return removed; }