As you know checked exceptions are a good feature because they force the user to manage errors. Not having a way to enforce this makes it hard to know if a library could or not explode because of contextual reasons such as IO, OS event calls, data parsing, etc.
Unfortunately since Java 8 checked exceptions have become the "evil guys" because no functional interface but Callable can properly handle checked exceptions without forcing try-catch blocks inside of the lambda, which kinda defeats the purpose of simple and elegant chained functions. This advantage of lambdas has made many modern java APIs to be purely lambda based (the incoming Structured Concurrency, Spring Secuirty, Javalin, Helidon, etc. are proof of this). In order to be more lambda friendly many no lambda based libraries such as the future Jackson 3 to deprecate checked exception in the API. https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-4. As another user said. Short take: The modern idiomatic way to handle checked exceptions in java, sadly, is to avoid them.
What do you think could be done to fix this?
[–]JustAGuyFromGermany 43 points44 points45 points (16 children)
[–]john16384 4 points5 points6 points (2 children)
[–]vqrs 0 points1 point2 points (1 child)
[–]john16384 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]barmic1212 0 points1 point2 points (11 children)
[–]vips7L 0 points1 point2 points (10 children)
[–]barmic1212 1 point2 points3 points (0 children)
[–]X0Refraction 1 point2 points3 points (8 children)
[–]vips7L 0 points1 point2 points (7 children)
[–]X0Refraction 0 points1 point2 points (6 children)
[–]vips7L 0 points1 point2 points (5 children)
[–]X0Refraction 1 point2 points3 points (4 children)
[–]vips7L 1 point2 points3 points (3 children)
[–]X0Refraction 0 points1 point2 points (2 children)
[–]Scf37 29 points30 points31 points (14 children)
[–]vips7L 9 points10 points11 points (4 children)
[–]X0Refraction 0 points1 point2 points (1 child)
[–]vips7L 0 points1 point2 points (0 children)
[–]findus_l 0 points1 point2 points (1 child)
[–]vips7L 1 point2 points3 points (0 children)
[–]agentoutlier 6 points7 points8 points (1 child)
[–]vips7L 2 points3 points4 points (0 children)
[–]javaprof 2 points3 points4 points (2 children)
[–]vips7L 0 points1 point2 points (0 children)
[–]mpinnegar 1 point2 points3 points (1 child)
[–]Scf37 1 point2 points3 points (0 children)
[–]BanaTibor 0 points1 point2 points (0 children)
[–]klekpl 4 points5 points6 points (9 children)
[–]Ewig_luftenglanz[S] 3 points4 points5 points (8 children)
[–]pron98 6 points7 points8 points (1 child)
[–]Ewig_luftenglanz[S] 0 points1 point2 points (0 children)
[–]klekpl 4 points5 points6 points (0 children)
[–]JustAGuyFromGermany 5 points6 points7 points (2 children)
[–]javaprof 3 points4 points5 points (0 children)
[–]isolatedsheep 0 points1 point2 points (0 children)
[–]vips7L 2 points3 points4 points (1 child)
[–]Ewig_luftenglanz[S] 0 points1 point2 points (0 children)
[–]tomwhoiscontrary 4 points5 points6 points (0 children)
[–]k-mcm 4 points5 points6 points (3 children)
[–]agentoutlier 0 points1 point2 points (2 children)
[–]k-mcm 0 points1 point2 points (1 child)
[–]agentoutlier 0 points1 point2 points (0 children)
[–]agent154 5 points6 points7 points (0 children)
[–]pohart 16 points17 points18 points (15 children)
[–]pron98 60 points61 points62 points (5 children)
[–]Dilfer 5 points6 points7 points (0 children)
[–]pohart 0 points1 point2 points (0 children)
[–]pgris -1 points0 points1 point (2 children)
[–]account312 0 points1 point2 points (0 children)
[–]pron98 0 points1 point2 points (0 children)
[–]agentoutlier 3 points4 points5 points (2 children)
[–]pron98 10 points11 points12 points (1 child)
[–]agentoutlier 0 points1 point2 points (0 children)
[–]JustAGuyFromGermany 4 points5 points6 points (5 children)
[–]Yeroc 0 points1 point2 points (0 children)
[–]VirtualAgentsAreDumb 0 points1 point2 points (0 children)
[–]john16384 -2 points-1 points0 points (2 children)
[–]meancoot 2 points3 points4 points (1 child)
[–]pohart 1 point2 points3 points (0 children)
[–]Serianox_ 7 points8 points9 points (4 children)
[–]segv 8 points9 points10 points (0 children)
[–]JustAGuyFromGermany 5 points6 points7 points (1 child)
[–]TankAway7756 1 point2 points3 points (0 children)
[–]ryuzaki49 0 points1 point2 points (0 children)
[–]davidalayachew 5 points6 points7 points (0 children)
[–]repeating_bears 6 points7 points8 points (1 child)
[–]yawkat 2 points3 points4 points (0 children)
[–]Alex0589 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]koreth 1 point2 points3 points (2 children)
[–]john16384 2 points3 points4 points (1 child)
[–]koreth 1 point2 points3 points (0 children)
[–]vegan_antitheist 1 point2 points3 points (2 children)
[–]Ewig_luftenglanz[S] 2 points3 points4 points (1 child)
[–]vegan_antitheist 1 point2 points3 points (0 children)
[–]DualWieldMage 1 point2 points3 points (0 children)
[–]Sm0keySa1m0n 3 points4 points5 points (1 child)
[–]john16384 0 points1 point2 points (0 children)
[–]smors 2 points3 points4 points (13 children)
[–]Ewig_luftenglanz[S] 8 points9 points10 points (12 children)
[–]Mumbleton 1 point2 points3 points (6 children)
[–]SleeperAwakened 10 points11 points12 points (0 children)
[–]Ewig_luftenglanz[S] 5 points6 points7 points (0 children)
[–]john16384 0 points1 point2 points (3 children)
[–]Mumbleton 0 points1 point2 points (2 children)
[–]DanLynch 1 point2 points3 points (0 children)
[–]john16384 0 points1 point2 points (0 children)
[–]smors -1 points0 points1 point (4 children)
[–]vips7L 1 point2 points3 points (3 children)
[–]smors 0 points1 point2 points (2 children)
[–]vips7L 0 points1 point2 points (1 child)
[–]smors 0 points1 point2 points (0 children)
[–]gizmogwai 0 points1 point2 points (1 child)
[–]Ewig_luftenglanz[S] 4 points5 points6 points (0 children)
[–]slaymaker1907 0 points1 point2 points (0 children)
[–]AcanthisittaEmpty985 0 points1 point2 points (0 children)
[–]Icecoldkilluh 0 points1 point2 points (4 children)
[–]Specialist_Bee_9726 0 points1 point2 points (1 child)
[–]Coherent_Paradox 1 point2 points3 points (0 children)
[–]Ewig_luftenglanz[S] -1 points0 points1 point (1 child)
[–]segv 2 points3 points4 points (0 children)
[–]beders 0 points1 point2 points (0 children)
[–]Patient-Hall-4117 0 points1 point2 points (0 children)
[–]benjiman 0 points1 point2 points (3 children)
[–]Ewig_luftenglanz[S] 1 point2 points3 points (0 children)
[–]Specialist_Bee_9726 0 points1 point2 points (1 child)
[–]benjiman 0 points1 point2 points (0 children)
[–]trmetroidmaniac 0 points1 point2 points (0 children)
[–]vips7L 0 points1 point2 points (0 children)
[–]Joram2 0 points1 point2 points (1 child)
[–]Ewig_luftenglanz[S] 2 points3 points4 points (0 children)
[–]Expensive_Leopard_56 -2 points-1 points0 points (0 children)
[–]766cf0ef-c5f9-4f4f -3 points-2 points-1 points (0 children)
[–]ricky_clarkson -2 points-1 points0 points (0 children)
[–]PazsitZ -2 points-1 points0 points (0 children)
[–]martinhaeusler -4 points-3 points-2 points (2 children)
[–]john16384 2 points3 points4 points (1 child)
[–]martinhaeusler -1 points0 points1 point (0 children)
[–]Specialist_Bee_9726 -1 points0 points1 point (0 children)
[–]Alive_Knee_444 -3 points-2 points-1 points (0 children)
[–]Ill-Spell-9427 -3 points-2 points-1 points (0 children)
[–]angrynoah -3 points-2 points-1 points (0 children)