I would create my own excpetion class if I wanted to add other properties to it, such as variables, location, username, num returned entries, etc.
Essentially, I would create a class that would narrow what error is and how to recreate it.
change
oh, and you can add validation errors to the exception class, which can be brought to the forefront to show errors.
source
share