Use TDes8Overflow to handle overflow issues when calling theTDes8::AppendFormat()
function.
The Overflow()
member function of the overflow handler, TDes8Overflow
,
can be defined and implemented to handle a potential descriptor overflow resulting
from a call to TDes8::AppendFormat()
.
There are many actions that the overflow function can perform but some possibilities are:
just return - in effect, this suppresses the panic caused by the overflow.
leave.
replace the entire string with some error indication, e.g. "Overflowed"
For more complex recovery actions, it may be easier to set a flag in the
implementation of the TDes8Overflow
class and check it on
return from the call to AppendFormat()
.