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.
Ernst de Haan
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).