public override void WriteWhitespace(string ws)
{
try
{
if (ws == null)
{
ws = string.Empty;
}
if (!XmlCharType.Instance.IsOnlyWhitespace(ws))
{
throw new ArgumentException(SR.Xml_NonWhitespace);
}
AdvanceState(Token.Whitespace);
if (SaveAttrValue)
{
_attrValueCache.WriteWhitespace(ws);
}
else
{
_writer.WriteWhitespace(ws);
}
}
catch
{
_currentState = State.Error;
throw;
}
}