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

> If so can you now understand why you would want to be alerted about a new exception getting thrown at compile-time as well?

The library code can already throw anything. OutOfHeap, over/underflow, div0, stackoverflow, threadinterrupted. The caller already knows the function can throw, and documenting one more flavour of throw doesn't tell the caller anything.



> documenting one more flavour of throw doesn't tell the caller anything

but it does, in cases when there are errors that can or should be retried. Like a whitelist of documented cases where recovery and retry are possible, and of course all this infinite runtime stuff that can happen unexpectedly, for which there is no immediate solution.




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

Search: