checked-exceptions

Languages that use checked exceptions


I'm just curious, is there any other languages besides Java that uses checked exceptions ?

I did try to find information about this but couldn't find any answers.


Solution

  • The reason you couldn't find information on any other languages using checked exceptions is they learned from Java's mistake.

    EDIT: So to clarify a little more checked exceptions were entirely a Java thing that in theory sounded like a really great idea, but in practice actually create a tight coupling between the consuming function and the function being consumed. It also makes it more tedious to handle an exception where it can be handled. Instead you have to catch and re-throw in every function in between where the exception was thrown and where it can actually be handled. I could rewrite it all here but I think this post does a magnificent job of explaining why checked exceptions are really not a good idea.

    https://blog.philipphauer.de/checked-exceptions-are-evil/