[Mono-devel-list] [Patch] RReader not to rely on bounds checking
Robin Boerdijk
robin_boerdijk at yahoo.com
Sun Jan 30 15:18:10 EST 2005
> >> }
> >> catch {
> >> xml = null;
> >>+ len = 0;
> >>+ throw;
> >> }
> >> }
> >
> >
> > What is the use of this catch block?
>
> I really don't know. Probably this catch block has to clear the
> string
> so a subsequent call to Read fails (instead of possibly returning
> garbage/incomplete data)...
But this code is in the constructor. So if an exception occurs, the
object creation fails and no method can be called on it. My guess is
that this catch block can safely be removed.
Robin.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Mono-devel-list
mailing list