It would be helpful if a TypeValueException would also have the appropriate cause exception, e.g. for a pattern type. Then this can be used to diagnose any relevant problems.
One possible implementation would be to add a protected checkValueImpl() method to the Type class and implement it in certain subclasses, such as the PatternType and the XmlType (it can have a SAXException as cause, or - in case XSD validation is supported - a schema validation exception).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This also applies to XML types.
One possible implementation would be to add a protected checkValueImpl() method to the Type class and implement it in certain subclasses, such as the PatternType and the XmlType (it can have a SAXException as cause, or - in case XSD validation is supported - a schema validation exception).