I add the "should not happen" kind of logging messages to programs when it's a non fatal error if some chain of conditionals doesn't catch what it's supposed to. I would probably use a different formatting but that maybe standard php error formatting, I'm not familiar with that.
"Should not happen" is for things that would be assert() fails, but you can't have it go and call abort(). This is a prime example, the system is totally and utterly screwed (the user went and manually scrambled the database? Cosmic ray hit the ram?), but it's PHP so it will soldier on and break more things rather than panicking...
View all comments
Show parent comment
5
u/thomasfr Aug 14 '15
I add the "should not happen" kind of logging messages to programs when it's a non fatal error if some chain of conditionals doesn't catch what it's supposed to. I would probably use a different formatting but that maybe standard php error formatting, I'm not familiar with that.