Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In that case it does exactly the wrong thing, by declaring checked exceptions in the method signature, which client code will be forced to deal with.

> In that case it does exactly the wrong thing, by declaring checked exceptions in the method signature, which client code will be forced to deal with. > > If you don't even understand how checked exceptions are supposed to work then no wonder you are hurting yourself on the language.

It's an error that you don't have a way to recover from. Reporting an error and leaving it to the client code (or in this case, the parent process) to deal with it, exactly as specified by the declaration of the method. That's actually exactly how exceptions are supposed to work.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: