Object convertedValue;
try {
convertedValue = converter.convertToDatabaseColumn( value );
}
catch (ClassCastException ce) {
convertedValue = value;
}
catch (PersistenceException pe) {
throw pe;
}
catch (RuntimeException re) {
throw new PersistenceException( "Error attempting to apply AttributeConverter", re );
}