14,953
edits
mNo edit summary |
|||
| Line 71: | Line 71: | ||
</pre> | </pre> | ||
Possible solution: | Possible solution: define the constants | ||
<pre> | <pre> | ||
# Date format constants | # Date format constants | ||
| Line 90: | Line 90: | ||
# Consistency: All date formatting uses the same format definitions | # Consistency: All date formatting uses the same format definitions | ||
# Error Prevention: Reduces risk of typos in repeated string literals | # Error Prevention: Reduces risk of typos in repeated string literals | ||
=== How to resolve "Define and throw a dedicated exception instead of using a generic one" === | === How to resolve "Define and throw a dedicated exception instead of using a generic one" === | ||