Skip to content

Commit

Permalink
ModuleRunner: do not rethrow caught exceptions
Browse files Browse the repository at this point in the history
Apparently this is a bad practice. Better to use chaining.
  • Loading branch information
ctrueden committed Aug 5, 2020
1 parent b3fcd90 commit a5993b3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/org/scijava/module/ModuleRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,10 @@ public Module call() {
run();
}
catch (final RuntimeException exc) {
if (log != null) log.error("Module threw exception", exc);
throw exc;
throw new RuntimeException("Module threw exception", exc);
}
catch (final Error err) {
if (log != null) log.error("Module threw error", err);
throw err;
throw new RuntimeException("Module threw error", err);
}
return module;
}
Expand Down

1 comment on commit a5993b3

@imagesc-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/fiji-august-2020-update-broke-mobie/41236/11

Please sign in to comment.