public override void WriteCharEntity(char ch)
{
try
{
if (Char.IsSurrogate(ch))
{
throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
}
AdvanceState(Token.Text);
if (SaveAttrValue)
{
_attrValueCache.WriteCharEntity(ch);
}
else
{
_writer.WriteCharEntity(ch);
}
}
catch
{
_currentState = State.Error;
throw;
}
}