DEV Community

Discussion on: A better way to handle magic values and constants?

Collapse
 
mjb2kmn profile image
MN Mark

Really I was thinking of the Error or Exception itself. You might have an exception with a name and numeric id that could be thrown from many different places. Each time it's thrown could require a different message. I think it's mostly poor implementation I'm seeing. As pointed out, there are decent ways to deal with this, implementors just need to use them.