readValueConverter<T> function

T? readValueConverter<T>(
  1. XmlValueConverter<T> converter,
  2. String? raw
)

Implementation

T? readValueConverter<T>(
  final XmlValueConverter<T> converter,
  final String? raw,
) {
  if (raw == null) return null;
  try {
    return converter.fromXmlString(raw);
  } on XmlSerializationException {
    rethrow;
  } catch (e) {
    throw XmlDeserializationException(
      'Converter ${converter.runtimeType} failed on "$raw": $e',
    );
  }
}