Organizing error messages and allowing setting custom ones

I decided to use constants for message identification, because PHP
$_FILES errors are identified by constants as well.