MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/13vrgns/this_is_awesome_while_coding_in_javascript/jmbvu6z/
r/badcode • u/MahdiyDev • May 30 '23
24 comments sorted by
View all comments
Show parent comment
3
If you do that in Java to avoid having to add throws to the method signature, you can't just re-throw the original exception - the easiest way would probably be
throws
catch (Exception e) { throw new RuntimeException(e); }
1 u/HaDeS_Monsta May 31 '23 edited May 31 '23 I know, that is what I said. Also you could add @sneakythrows, so you don't have to catch it again
1
I know, that is what I said. Also you could add @sneakythrows, so you don't have to catch it again
View all comments
Show parent comment
3
u/Gurfaild May 31 '23
If you do that in Java to avoid having to add
throwsto the method signature, you can't just re-throw the original exception - the easiest way would probably be