Error Handling Strategies

Debate on software error handling approaches, including exceptions vs. error codes, crashing vs. graceful recovery, propagation, and philosophies like 'let it crash'.

➡️ Stable 0.5x Programming Languages
4,873
Comments
20
Years Active
5
Top Authors
#5371
Topic ID

Activity Over Time

2007
4
2008
30
2009
37
2010
37
2011
92
2012
157
2013
154
2014
215
2015
200
2016
284
2017
256
2018
359
2019
295
2020
402
2021
403
2022
481
2023
485
2024
462
2025
490
2026
30

Keywords

e.g IMHO ANYTHING ProductNotFoundException PHB RTTI errors error handling exceptions error handling exception code entries crash entry

Sample Comments

GTP Jan 15, 2024 View on HN

Yes, and it's ironic that there's an error in the error handling routine :D

zzzcpan Nov 26, 2018 View on HN

That's the point, forcing to handle errors doesn't force to do it properly.

wakawaka28 Dec 31, 2025 View on HN

Sometimes the "error" is more like, "this is a case that logically could happen but I'm not going to handle it, nor refactor the whole program to stop it from being expressable"

empath75 Jul 7, 2020 View on HN

There are other ways of handling errors besides exceptions.

abledon Aug 27, 2020 View on HN

probably what happens when everyone codes using the 'Don't ask for permission, ask for forgiveness later' principle when handling errors

29athrowaway Dec 8, 2020 View on HN

You do not handle errors by randomly segfaulting.

umanwizard Jun 17, 2020 View on HN

That’s not ignoring errors, it’s explicitly choosing what to do in case of one (crash).

adhesive_wombat Aug 22, 2022 View on HN

"Error handling is just expensive code bloat" -- PHB

marcosdumay Feb 19, 2021 View on HN

Usually, you don't have any good thing to do with the error, so keeping it around just makes your code worse.

munchlax Oct 20, 2025 View on HN

IMHO if error handling is rocket science, the error is you