logoalt Hacker News

chowellsyesterday at 4:30 PM1 replyview on HN

You report an error and exit cleanly with a proper operating system error code. Crashing is a quick hack, acceptable for throwaway projects but not in software used long-term.


Replies

SoftTalkeryesterday at 5:40 PM

Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.

Fix your inputs.

show 1 reply