We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
What about this scenario:
A constructor requires a integer as param which maps to the id field of the corresponding database table.
Which exception subtype should be used if the value of the param is a id which isn't stored in the database table?
Would UnexpectedValueException be correct or is it InvalidArgumentException or does the SPL exception not cover this scenario?
see https://stackoverflow.com/q...
Nice Article
Id avoid any global namespace exception, especially if there is any plans to expose Domain logic or validaiton messages to the client/user. Becasue they are in the global namespace any 3rd aprty library you have installed can throw them for any reason and break the conventions of your own codebase.
My advice is always take the time to create and only throw your own custom exceptions.