by kstenerud · 9y ago · 0 comments
So yeah, want your implementation to consult a database? Sorry, the interface you must implement doesn't declare any checked exceptions, so say hello to app-killing RuntimeException wrapped SQLExceptions :/
Exception obfuscation frameworks (Spring) just kick the can down the road, creating problems without any discernible benefit.
It verges on malpractice to design an interface and declare that no implementation of it could possibly ever fail. I'm looking at you, Runnable.
This would be similar to how Go functions always return the same error type, but without the boilerplate.