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

The problem with this is you don't have context on subgraphs of control flow which have already returned by the time of the error.

I think our disagreement is less about error handling and more about logging policy. I favour a logging policy which lets you understand what the code is doing even if it doesn't error out; this means that you don't need to log on unwind. You favour a logging policy specific for errors.

My position is that your position ends up with less useful context for diagnosing errors.



There is no reason you can use that scheme only for errors? In fact I don't.

I use "unwinding" for diagnostics even in the happy case.




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

Search: