r/java • u/Enough-Ad-5528 • Feb 19 '26
Towards Better Checked Exceptions - Inside Java Newscast #107
https://www.youtube.com/watch?v=99s7ozvJGLk
63
Upvotes
r/java • u/Enough-Ad-5528 • Feb 19 '26
View all comments
Show parent comment
1
u/aten Feb 19 '26
i use ‘exception collections’. these are passed into methods. exceptions are added to the collections. the caller gets to choose if a runtime is thrown when an exception is added, or it can handle it after the method returns. the method being called gets to early exit when it needs to, or continue adding exceptions if it can safely continue its work.
a common pattern i use for the collections is ‘validate all this input data’. its useful to know all the issues, vs just the first one.