Improve error handling for invalid types
After introducing the Utility\TypeHandling functions, an InvalidArgumentException is thrown if some @var annotation uses a wrong type (and certainly also if invalid types are used elsewhere). However, the exception doesn't (and can't) give any hint where the invalid type was declared.
We have two options to improve this:
1) let the TypeHandling functions return FALSE if the type could not be parsed and throw a proper exception in the calling method
2) let the calling method catch the TypeHandling exceptions and rethrow a better exception
I'm all for solution 1)
[BUGFIX] Type declaration errors give hint on root cause
The TypeHandling::parseType() function will now throw a more specific
exception which allows other code parts to display more meaningful
error messages if a variable type was declared wrongly.